@mx-cartographer/experiences 9.7.56 → 9.7.58

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/core/stores/TransactionStore.d.ts +6 -0
  3. package/dist/core/stores/TransactionStore.es.js +45 -33
  4. package/dist/core/stores/TransactionStore.es.js.map +1 -1
  5. package/dist/core/types/InsightsInstanceSlotData.d.ts +2 -1
  6. package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
  7. package/dist/core/types/localization/InsightsFeedCopy.d.ts +8 -0
  8. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.d.ts +5 -1
  9. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +63 -58
  10. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
  11. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +115 -107
  12. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  13. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +7 -1
  14. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +88 -59
  15. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
  16. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.d.ts +7 -1
  17. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js +13 -13
  18. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js.map +1 -1
  19. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.d.ts +1 -1
  20. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js +10 -7
  21. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js.map +1 -1
  22. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +46 -15
  23. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js +87 -59
  24. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
  25. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +93 -53
  26. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
  27. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +20 -20
  28. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +48 -39
  29. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
  30. package/dist/insights-v2/components/LogoClusterCard.d.ts +7 -1
  31. package/dist/insights-v2/components/LogoClusterCard.es.js +54 -48
  32. package/dist/insights-v2/components/LogoClusterCard.es.js.map +1 -1
  33. package/dist/insights-v2/components/LogoTile.d.ts +6 -4
  34. package/dist/insights-v2/components/LogoTile.es.js +21 -19
  35. package/dist/insights-v2/components/LogoTile.es.js.map +1 -1
  36. package/dist/insights-v2/components/MerchantHighlightCard.d.ts +8 -3
  37. package/dist/insights-v2/components/MerchantHighlightCard.es.js +24 -21
  38. package/dist/insights-v2/components/MerchantHighlightCard.es.js.map +1 -1
  39. package/dist/insights-v2/components/P2PLogoStack.d.ts +7 -1
  40. package/dist/insights-v2/components/P2PLogoStack.es.js +34 -26
  41. package/dist/insights-v2/components/P2PLogoStack.es.js.map +1 -1
  42. package/dist/insights-v2/components/celebrationGradients.d.ts +6 -3
  43. package/dist/insights-v2/components/celebrationGradients.es.js +8 -7
  44. package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -1
  45. package/dist/insights-v2/components/statusTokens.d.ts +0 -5
  46. package/dist/insights-v2/components/statusTokens.es.js +0 -5
  47. package/dist/insights-v2/components/statusTokens.es.js.map +1 -1
  48. package/dist/insights-v2/index.es.js +75 -75
  49. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.ts"],"sourcesContent":["import {\n ERROR_WASH_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\nimport { STATUS_ERROR_TOKENS, STATUS_SUCCESS_TOKENS } from '../../../components/statusTokens'\n\n/**\n * Design branches of the Merchant component block (architecture doc, Merchant row): one\n * highlighted merchant (`single_*`, `MerchantHighlightCard`) or a row of merchant tiles\n * (`multiple_*`, `LogoClusterCard`), each plain, celebrated (`success`) or flagged (`error`).\n */\nexport const merchantBlockVariant = {\n SingleStandard: 'single_standard',\n SingleLarge: 'single_large',\n SingleSuccess: 'single_success',\n SingleError: 'single_error',\n MultipleStandard: 'multiple_standard',\n MultipleSuccess: 'multiple_success',\n MultipleError: 'multiple_error',\n} as const\n\nexport type MerchantBlockVariant = (typeof merchantBlockVariant)[keyof typeof merchantBlockVariant]\n\nexport type MerchantStatus = 'success' | 'error'\n\nexport interface MerchantBlockLayoutConfig {\n kind: 'single' | 'multiple'\n /** Single: the amount as a dark pill or plain text. */\n amountVariant?: 'pill' | 'text'\n /** A wash layered over the card. */\n background?: string\n /** Draws `status_text` in a pill of this tone: beside the single name, under the multiple row. */\n status?: MerchantStatus\n}\n\nexport const STATUS_PILL_TOKENS: Record<\n MerchantStatus,\n { bgcolor: string; borderColor: string; textColor: string; icon: string }\n> = {\n success: { ...STATUS_SUCCESS_TOKENS, icon: 'check_circle' },\n error: { ...STATUS_ERROR_TOKENS, icon: 'error' },\n}\n\nconst SINGLE_LARGE: MerchantBlockLayoutConfig = { kind: 'single', amountVariant: 'pill' }\n\nexport const MERCHANT_LAYOUT: Record<MerchantBlockVariant, MerchantBlockLayoutConfig> = {\n single_standard: { kind: 'single', amountVariant: 'text' },\n single_large: SINGLE_LARGE,\n single_success: { ...SINGLE_LARGE, background: WARM_LIME_ACCENT_GRADIENT, status: 'success' },\n single_error: { ...SINGLE_LARGE, background: ERROR_WASH_GRADIENT, status: 'error' },\n multiple_standard: { kind: 'multiple' },\n multiple_success: { kind: 'multiple', background: WARM_LIME_ACCENT_GRADIENT, status: 'success' },\n multiple_error: { kind: 'multiple', background: ERROR_WASH_GRADIENT, status: 'error' },\n}\n"],"mappings":";;AAWA,IAAa,IAAuB;AAAA,EAClC,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,eAAe;AAAA,EACf,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,eAAe;AACjB,GAgBa,IAGT;AAAA,EACF,SAAS;AAAA,IAAE,GAAG;AAAA,IAAuB,MAAM;AAAA,EAAe;AAAA,EAC1D,OAAO;AAAA,IAAE,GAAG;AAAA,IAAqB,MAAM;AAAA,EAAQ;AACjD,GAEM,IAA0C;AAAA,EAAE,MAAM;AAAA,EAAU,eAAe;AAAO,GAE3E,IAA2E;AAAA,EACtF,iBAAiB;AAAA,IAAE,MAAM;AAAA,IAAU,eAAe;AAAA,EAAO;AAAA,EACzD,cAAc;AAAA,EACd,gBAAgB;AAAA,IAAE,GAAG;AAAA,IAAc,YAAY;AAAA,IAA2B,QAAQ;AAAA,EAAU;AAAA,EAC5F,cAAc;AAAA,IAAE,GAAG;AAAA,IAAc,YAAY;AAAA,IAAqB,QAAQ;AAAA,EAAQ;AAAA,EAClF,mBAAmB,EAAE,MAAM,WAAW;AAAA,EACtC,kBAAkB;AAAA,IAAE,MAAM;AAAA,IAAY,YAAY;AAAA,IAA2B,QAAQ;AAAA,EAAU;AAAA,EAC/F,gBAAgB;AAAA,IAAE,MAAM;AAAA,IAAY,YAAY;AAAA,IAAqB,QAAQ;AAAA,EAAQ;AACvF"}
1
+ {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.ts"],"sourcesContent":["import {\n celebrateGradient,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\n\n/** ditto declares only `highlight` today. */\nexport const merchantBlockVariant = {\n Highlight: 'highlight',\n SingleStandard: 'single_standard',\n SingleSuccess: 'single_success',\n SingleSubscription: 'single_subscription',\n MultipleStandard: 'multiple_standard',\n MultipleSuccess: 'multiple_success',\n MultipleSubscription: 'multiple_subscription',\n MultipleBadged: 'multiple_badged',\n} as const\n\nexport type MerchantBlockVariant = (typeof merchantBlockVariant)[keyof typeof merchantBlockVariant]\n\nexport interface MerchantBlockLayoutConfig {\n /** Merchant card, logo cascade, or ranked logos. */\n kind: 'single' | 'cascade' | 'ranked'\n amountVariant?: 'pill' | 'text'\n /** A wash; replaces `bgcolor`. */\n background?: string\n bgcolor?: string\n borderColor?: string\n fullBleed?: boolean\n hideDate?: boolean\n logo?: { size?: number; shadow?: 'offset' | 'elevation'; borderColor?: string; radius?: number }\n /** Draw `status_text` in a success pill. */\n status?: boolean\n}\n\nconst STANDARD = { bgcolor: 'secondary.lighter' }\nconst SUCCESS = { background: WARM_LIME_ACCENT_GRADIENT, status: true }\n\n// Figma 14633:139111\nconst SINGLE: MerchantBlockLayoutConfig = {\n kind: 'single',\n amountVariant: 'pill',\n fullBleed: true,\n hideDate: true,\n logo: { size: 72, shadow: 'elevation', borderColor: 'divider', radius: 8 },\n}\n\nexport const MERCHANT_LAYOUT: Record<MerchantBlockVariant, MerchantBlockLayoutConfig> = {\n highlight: {\n kind: 'single',\n amountVariant: 'text',\n bgcolor: 'warning.lighter',\n borderColor: 'warning.light',\n },\n single_standard: { ...SINGLE, ...STANDARD },\n single_success: { ...SINGLE, ...SUCCESS },\n single_subscription: { ...SINGLE, background: celebrateGradient(232.03) },\n multiple_standard: { kind: 'cascade', ...STANDARD },\n multiple_success: { kind: 'cascade', ...SUCCESS },\n multiple_subscription: { kind: 'cascade', background: celebrateGradient(200.73) },\n multiple_badged: { kind: 'ranked', background: celebrateGradient(242.46) },\n}\n"],"mappings":";AAMA,IAAa,IAAuB;AAAA,EAClC,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,gBAAgB;AAClB,GAmBM,IAAW,EAAE,SAAS,oBAAoB,GAC1C,IAAU;AAAA,EAAE,YAAY;AAAA,EAA2B,QAAQ;AAAK,GAGhE,IAAoC;AAAA,EACxC,MAAM;AAAA,EACN,eAAe;AAAA,EACf,WAAW;AAAA,EACX,UAAU;AAAA,EACV,MAAM;AAAA,IAAE,MAAM;AAAA,IAAI,QAAQ;AAAA,IAAa,aAAa;AAAA,IAAW,QAAQ;AAAA,EAAE;AAC3E,GAEa,IAA2E;AAAA,EACtF,WAAW;AAAA,IACT,MAAM;AAAA,IACN,eAAe;AAAA,IACf,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,iBAAiB;AAAA,IAAE,GAAG;AAAA,IAAQ,GAAG;AAAA,EAAS;AAAA,EAC1C,gBAAgB;AAAA,IAAE,GAAG;AAAA,IAAQ,GAAG;AAAA,EAAQ;AAAA,EACxC,qBAAqB;AAAA,IAAE,GAAG;AAAA,IAAQ,YAAY,EAAkB,MAAM;AAAA,EAAE;AAAA,EACxE,mBAAmB;AAAA,IAAE,MAAM;AAAA,IAAW,GAAG;AAAA,EAAS;AAAA,EAClD,kBAAkB;AAAA,IAAE,MAAM;AAAA,IAAW,GAAG;AAAA,EAAQ;AAAA,EAChD,uBAAuB;AAAA,IAAE,MAAM;AAAA,IAAW,YAAY,EAAkB,MAAM;AAAA,EAAE;AAAA,EAChF,iBAAiB;AAAA,IAAE,MAAM;AAAA,IAAU,YAAY,EAAkB,MAAM;AAAA,EAAE;AAC3E"}
@@ -25,6 +25,12 @@ interface LogoClusterCardProps {
25
25
  * copy-store-derived function, or they will ship the English default.
26
26
  */
27
27
  rankLabel?: (rank: number) => string;
28
+ /** Ranked tile top offsets, cycled. */
29
+ rankOffsets?: readonly number[];
30
+ /** Ranked tiles overlap by this many px, centred. */
31
+ overlap?: number;
32
+ /** Edge to edge: no inset, square corners. */
33
+ fullBleed?: boolean;
28
34
  /**
29
35
  * Optional element rendered below the logo row (e.g. a `<StatusPill>`).
30
36
  * Figma: a status stacked beneath the logos on the slot.
@@ -36,5 +42,5 @@ interface LogoClusterCardProps {
36
42
  * A row of rounded brand/logo tiles on a card surface, diagonally staggered
37
43
  * (top -> center -> bottom). Figma: Monthly Subscription Aggregate V2.
38
44
  */
39
- declare const LogoClusterCard: ({ background, footer, logoSize, logos, ranked, rankLabel, stagger, sx, }: LogoClusterCardProps) => import("react/jsx-runtime").JSX.Element;
45
+ declare const LogoClusterCard: ({ background, footer, fullBleed, logoSize, logos, overlap, ranked, rankLabel, rankOffsets, stagger, sx, }: LogoClusterCardProps) => import("react/jsx-runtime").JSX.Element;
40
46
  export default LogoClusterCard;
@@ -1,98 +1,104 @@
1
- import { getLogoElevation as R } from "./logoShadow.es.js";
2
- import S from "./LogoTile.es.js";
3
- import n from "@mui/material/Stack";
4
- import { jsx as o, jsxs as y } from "react/jsx-runtime";
5
- import s from "@mui/material/Box";
6
- import E from "@mui/material/Badge";
7
- var A = (r) => `Rank ${r}`, l = [
1
+ import { getLogoElevation as E } from "./logoShadow.es.js";
2
+ import A from "./LogoTile.es.js";
3
+ import d from "@mui/material/Stack";
4
+ import { jsx as t, jsxs as G } from "react/jsx-runtime";
5
+ import m from "@mui/material/Box";
6
+ import _ from "@mui/material/Badge";
7
+ var T = (o) => `Rank ${o}`, p = [
8
8
  "flex-start",
9
9
  "center",
10
10
  "flex-end"
11
- ], G = 20, g = [
11
+ ], C = 20, I = [
12
12
  10,
13
13
  25,
14
14
  43
15
- ], _ = 122, a = {
15
+ ], L = 122, i = {
16
16
  x: 10,
17
17
  y: 8
18
- }, T = { "& .MuiBadge-badge": {
18
+ }, N = { "& .MuiBadge-badge": {
19
19
  bgcolor: "common.black",
20
20
  border: "1px solid",
21
21
  borderColor: "common.white",
22
22
  borderRadius: "999px",
23
- boxShadow: (r) => R(r),
23
+ boxShadow: (o) => E(o),
24
24
  color: "common.white",
25
- fontSize: (r) => r.typography.body2.fontSize,
26
- fontWeight: (r) => r.typography.fontWeightRegular,
25
+ fontSize: (o) => o.typography.body2.fontSize,
26
+ fontWeight: (o) => o.typography.fontWeightRegular,
27
27
  height: 24,
28
28
  minWidth: 24,
29
29
  padding: 0,
30
- transform: `translate(-${a.x}px, -${a.y}px)`
31
- } }, O = ({ background: r, footer: d, logoSize: i = 72, logos: c, ranked: e = !1, rankLabel: x = A, stagger: h = !0, sx: m }) => {
32
- const f = h ? (l.length - 1) * G : 0, b = e ? _ : i + f, v = e ? 16 : 32;
33
- return /* @__PURE__ */ o(n, {
30
+ transform: `translate(-${i.x}px, -${i.y}px)`
31
+ } }, O = ({ background: o, footer: s, fullBleed: a = !1, logoSize: n = 72, logos: b, overlap: h, ranked: e = !1, rankLabel: v = T, rankOffsets: c = I, stagger: g = !0, sx: f }) => {
32
+ const w = g ? (p.length - 1) * C : 0, R = e ? L : n + w, S = e ? a ? 24 : 16 : 32, l = e && h !== void 0;
33
+ return /* @__PURE__ */ t(d, {
34
34
  sx: {
35
- pt: 8,
36
- px: 16,
35
+ pt: a ? 0 : 8,
36
+ px: a ? 0 : 16,
37
37
  width: "100%",
38
- ...m
38
+ ...f
39
39
  },
40
- children: /* @__PURE__ */ y(n, {
40
+ children: /* @__PURE__ */ G(d, {
41
41
  sx: {
42
42
  alignItems: "center",
43
- background: r ?? void 0,
44
- bgcolor: r ? void 0 : "background.paper",
45
- borderRadius: "8px",
43
+ background: o ?? void 0,
44
+ bgcolor: o ? void 0 : "background.paper",
45
+ borderRadius: a ? 0 : "8px",
46
46
  gap: 12,
47
47
  py: 16,
48
48
  width: "100%"
49
49
  },
50
- children: [/* @__PURE__ */ o(n, {
50
+ children: [/* @__PURE__ */ t(d, {
51
51
  sx: {
52
52
  alignItems: "flex-start",
53
53
  flexDirection: "row",
54
- justifyContent: "space-between",
55
- height: b,
56
- px: v,
54
+ justifyContent: l ? "center" : "space-between",
55
+ isolation: l ? "isolate" : void 0,
56
+ height: R,
57
+ px: S,
57
58
  width: "100%"
58
59
  },
59
- children: c.map((u, t) => {
60
- const p = /* @__PURE__ */ o(S, {
60
+ children: b.map((u, r) => {
61
+ const x = /* @__PURE__ */ t(A, {
61
62
  borderColor: "divider",
62
63
  shadow: "elevation",
63
- size: i,
64
+ size: n,
64
65
  children: u
65
- }), w = e ? {
66
+ }), y = e ? {
66
67
  boxSizing: "border-box",
67
- mt: g[t % g.length],
68
- pl: a.x,
69
- width: i + a.x + 2
70
- } : { alignSelf: h ? l[t % l.length] : "center" };
71
- return /* @__PURE__ */ o(s, {
72
- sx: w,
73
- children: e ? /* @__PURE__ */ o(E, {
68
+ mt: c[r % c.length],
69
+ pl: i.x,
70
+ width: n + i.x + 2,
71
+ ...l && {
72
+ ml: r ? `${-(i.x + 2 + h)}px` : 0,
73
+ position: "relative",
74
+ zIndex: r + 1
75
+ }
76
+ } : { alignSelf: g ? p[r % p.length] : "center" };
77
+ return /* @__PURE__ */ t(m, {
78
+ sx: y,
79
+ children: e ? /* @__PURE__ */ t(_, {
74
80
  anchorOrigin: {
75
81
  horizontal: "left",
76
82
  vertical: "top"
77
83
  },
78
- "aria-label": x(t + 1),
84
+ "aria-label": v(r + 1),
79
85
  role: "img",
80
- badgeContent: /* @__PURE__ */ o("span", {
86
+ badgeContent: /* @__PURE__ */ t("span", {
81
87
  "aria-hidden": !0,
82
- children: t + 1
88
+ children: r + 1
83
89
  }),
84
90
  overlap: "rectangular",
85
- sx: T,
86
- children: p
87
- }) : p
88
- }, t);
91
+ sx: N,
92
+ children: x
93
+ }) : x
94
+ }, r);
89
95
  })
90
- }), d && /* @__PURE__ */ o(s, {
96
+ }), s && /* @__PURE__ */ t(m, {
91
97
  sx: {
92
98
  px: 16,
93
99
  width: "100%"
94
100
  },
95
- children: d
101
+ children: s
96
102
  })]
97
103
  })
98
104
  });
@@ -1 +1 @@
1
- {"version":3,"file":"LogoClusterCard.es.js","names":[],"sources":["../../../src/insights-v2/components/LogoClusterCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Badge from '@mui/material/Badge'\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps, Theme } from '@mui/material/styles'\n\nimport LogoTile from './LogoTile'\nimport { getLogoElevation } from './logoShadow'\n\ninterface LogoClusterCardProps {\n /** Brand/merchant logo visuals, rendered as a row of tiles. */\n logos: ReactNode[]\n /** Tile size in px. */\n logoSize?: number\n /** Card surface color/background token or CSS background string. */\n background?: string\n /**\n * Stagger the tiles diagonally (Figma cycles each tile's vertical alignment\n * top -> center -> bottom). When false, all tiles are vertically centered.\n * Default true.\n */\n stagger?: boolean\n /**\n * Overlay a 1-based rank badge on the top-left of each tile (Figma: Monthly\n * Top Merchant Spending V3). Default false.\n */\n ranked?: boolean\n /**\n * Accessible label for each rank badge, given the 1-based rank. Lets the\n * consumer pass localized copy (e.g. from the copy store) and control word\n * order. Defaults to `Rank {n}` — callers in a localized context must supply a\n * copy-store-derived function, or they will ship the English default.\n */\n rankLabel?: (rank: number) => string\n /**\n * Optional element rendered below the logo row (e.g. a `<StatusPill>`).\n * Figma: a status stacked beneath the logos on the slot.\n */\n footer?: ReactNode\n sx?: SxProps\n}\n\n// Default accessible label for a rank badge. Hoisted to a stable reference so\n// it isn't re-created each render (consumers override via the `rankLabel` prop,\n// e.g. with localized copy).\nconst defaultRankLabel = (rank: number) => `Rank ${rank}`\n\n// Non-ranked (MSA V2): tiles cascade via counter-axis alignment in a 112 zone\n// (tops 0/20/40).\nconst STAGGER_ALIGN = ['flex-start', 'center', 'flex-end'] as const\nconst STAGGER_STEP = 20\n// Ranked (Top Merchant V3): exact Figma logo top-offsets within the 122 `Logos`\n// content zone (logo2 bottom leaves ~7px). Not a uniform step, so use the\n// measured values rather than alignSelf.\nconst RANK_TILE_OFFSETS = [10, 25, 43] as const\nconst RANK_ROW_HEIGHT = 122\n// Figma: the rank badge overhangs the logo's top-left by 10px left / 8px up.\n// The row reserves the left overhang once (so the first badge stays inside the\n// card edge); the badge itself is offset by it via the MUI transform below.\nconst RANK_BADGE_OVERHANG = { x: 10, y: 8 } as const\n\n// Figma rank badge on MUI `Badge`: a 24px pure-black disc, 1px white border,\n// white `body2` number, soft elevation shadow. MUI centers the badge on the\n// logo's corner (`translate(-50%,-50%)`); override the transform so its top-left\n// lands exactly 10px left / 8px above the logo (Figma's overhang).\nconst rankBadgeSx: SxProps<Theme> = {\n '& .MuiBadge-badge': {\n // Intentional: `common.black`/`common.white` are mode-INDEPENDENT in\n // createMXTheme (unlike `text.primary`/`primary.contrastText`, which flip\n // per theme). A white-on-black disc plus the white border below keeps the\n // badge legible in BOTH light and dark mode — this is the dark-mode FIX, not\n // a bug. Do not \"theme-aware\"-ify these colors; it would break the Figma\n // look in light mode for no gain (the number sits on the always-black disc,\n // never on the surface).\n bgcolor: 'common.black',\n border: '1px solid',\n borderColor: 'common.white',\n borderRadius: '999px',\n boxShadow: (theme: Theme) => getLogoElevation(theme),\n color: 'common.white',\n // Figma number is `typography/body2` (13px / regular), not MUI's badge\n // default (12px / medium).\n fontSize: (theme: Theme) => theme.typography.body2.fontSize,\n fontWeight: (theme: Theme) => theme.typography.fontWeightRegular,\n height: 24,\n minWidth: 24,\n padding: 0,\n transform: `translate(-${RANK_BADGE_OVERHANG.x}px, -${RANK_BADGE_OVERHANG.y}px)`,\n },\n}\n\n/**\n * A row of rounded brand/logo tiles on a card surface, diagonally staggered\n * (top -> center -> bottom). Figma: Monthly Subscription Aggregate V2.\n */\nconst LogoClusterCard = ({\n background,\n footer,\n logoSize = 72,\n logos,\n ranked = false,\n rankLabel = defaultRankLabel,\n stagger = true,\n sx,\n}: LogoClusterCardProps) => {\n // Non-ranked cascades via alignSelf in a `logoSize + span` zone. Ranked uses\n // the exact Figma offsets in the 122 zone (its cascade isn't a uniform step).\n const staggerSpan = stagger ? (STAGGER_ALIGN.length - 1) * STAGGER_STEP : 0\n const rowHeight = ranked ? RANK_ROW_HEIGHT : logoSize + staggerSpan\n // Figma `Logos` frame side padding: 32 for MSA V2, 16 for the ranked cluster.\n const rowPaddingX = ranked ? 16 : 32\n\n return (\n <Stack sx={{ pt: 8, px: 16, width: '100%', ...sx }}>\n <Stack\n sx={{\n alignItems: 'center',\n background: background ?? undefined,\n bgcolor: background ? undefined : 'background.paper',\n borderRadius: '8px',\n gap: 12,\n // Card (Figma `Wrapper`) has no horizontal padding of its own — the\n // logo row carries its side padding (`rowPaddingX`); only vertical.\n py: 16,\n width: '100%',\n }}\n >\n <Stack\n sx={{\n alignItems: 'flex-start',\n flexDirection: 'row',\n // Both variants use Figma's SPACE_BETWEEN (fills the row). Ranked\n // items reserve the badge overhang (below), so this yields Figma's\n // 26/18 side insets and ~14px visible gaps; MSA yields ~3px gaps.\n justifyContent: 'space-between',\n height: rowHeight,\n px: rowPaddingX,\n width: '100%',\n }}\n >\n {logos.map((logo, index) => {\n const tile = (\n <LogoTile borderColor=\"divider\" shadow=\"elevation\" size={logoSize}>\n {logo}\n </LogoTile>\n )\n // Ranked: offset each tile to its exact Figma top and size the item\n // to Figma's badge-inclusive box (72 logo + 10 left overhang + 2\n // right = 84), with the logo pushed right by the overhang. Then\n // SPACE_BETWEEN reproduces the 26/18 side insets and 14px gaps.\n // Non-ranked: cascade via alignSelf in the stagger zone.\n const positionSx = ranked\n ? {\n boxSizing: 'border-box' as const,\n mt: RANK_TILE_OFFSETS[index % RANK_TILE_OFFSETS.length],\n pl: RANK_BADGE_OVERHANG.x,\n width: logoSize + RANK_BADGE_OVERHANG.x + 2,\n }\n : { alignSelf: stagger ? STAGGER_ALIGN[index % STAGGER_ALIGN.length] : 'center' }\n\n return (\n // Index key is fine: the caller-supplied list is static.\n <Box\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n sx={positionSx}\n >\n {ranked ? (\n <Badge\n anchorOrigin={{ horizontal: 'left', vertical: 'top' }}\n aria-label={rankLabel(index + 1)}\n // `role=\"img\"` gives the root span a role that supports an\n // accessible name, so aria-label is surfaced to AT (a bare\n // generic span's aria-label is not announced).\n role=\"img\"\n // Hide the visible number from AT so the badge is announced\n // once via aria-label (\"Rank 1\"), not twice (\"Rank 1 … 1\").\n badgeContent={<span aria-hidden={true}>{index + 1}</span>}\n overlap=\"rectangular\"\n sx={rankBadgeSx}\n >\n {tile}\n </Badge>\n ) : (\n tile\n )}\n </Box>\n )\n })}\n </Stack>\n {footer && <Box sx={{ px: 16, width: '100%' }}>{footer}</Box>}\n </Stack>\n </Stack>\n )\n}\n\nexport default LogoClusterCard\n"],"mappings":";;;;;;AA8CA,IAAM,IAAA,CAAoB,MAAiB,QAAQ,CAAA,IAI7C,IAAgB;AAAA,EAAC;AAAA,EAAc;AAAA,EAAU;AAAU,GACnD,IAAe,IAIf,IAAoB;AAAA,EAAC;AAAA,EAAI;AAAA,EAAI;AAAE,GAC/B,IAAkB,KAIlB,IAAsB;AAAA,EAAE,GAAG;AAAA,EAAI,GAAG;AAAE,GAMpC,IAA8B,EAClC,qBAAqB;AAAA,EAQnB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,cAAc;AAAA,EACd,WAAA,CAAY,MAAiB,EAAiB,CAAK;AAAA,EACnD,OAAO;AAAA,EAGP,UAAA,CAAW,MAAiB,EAAM,WAAW,MAAM;AAAA,EACnD,YAAA,CAAa,MAAiB,EAAM,WAAW;AAAA,EAC/C,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AAAA,EACT,WAAW,cAAc,EAAoB,CAAA,QAAS,EAAoB,CAAA;AAC5E,EACF,GAMM,IAAA,CAAmB,EACvB,YAAA,GACA,QAAA,GACA,UAAA,IAAW,IACX,OAAA,GACA,QAAA,IAAS,IACT,WAAA,IAAY,GACZ,SAAA,IAAU,IACV,IAAA,EAAA,MAC0B;AAG1B,QAAM,IAAc,KA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gBAAA,EAAC,QAAD;AAAA,gBAAM,eAAa;AAAA,gBAAO,UAAA,IAAQ;AAAA,cAAQ,CAAA;AAAA,cACxD,SAAQ;AAAA,cACR,IAAI;AAAA,cAEH,UAAA;AAAA,YACI,CAAA,IAEP;AAAA,UAEC,GAtBE,CAsBF;AAAA,QAET,CAAC;AAAA,MACI,CAAA,GACN,KAAU,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,IAAI;AAAA,UAAI,OAAO;AAAA,QAAO;AAAA,QAAI,UAAA;AAAA,MAAY,CAAA,CACvD;AAAA;EACF,CAAA;AAEX"}
1
+ {"version":3,"file":"LogoClusterCard.es.js","names":[],"sources":["../../../src/insights-v2/components/LogoClusterCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Badge from '@mui/material/Badge'\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps, Theme } from '@mui/material/styles'\n\nimport LogoTile from './LogoTile'\nimport { getLogoElevation } from './logoShadow'\n\ninterface LogoClusterCardProps {\n /** Brand/merchant logo visuals, rendered as a row of tiles. */\n logos: ReactNode[]\n /** Tile size in px. */\n logoSize?: number\n /** Card surface color/background token or CSS background string. */\n background?: string\n /**\n * Stagger the tiles diagonally (Figma cycles each tile's vertical alignment\n * top -> center -> bottom). When false, all tiles are vertically centered.\n * Default true.\n */\n stagger?: boolean\n /**\n * Overlay a 1-based rank badge on the top-left of each tile (Figma: Monthly\n * Top Merchant Spending V3). Default false.\n */\n ranked?: boolean\n /**\n * Accessible label for each rank badge, given the 1-based rank. Lets the\n * consumer pass localized copy (e.g. from the copy store) and control word\n * order. Defaults to `Rank {n}` — callers in a localized context must supply a\n * copy-store-derived function, or they will ship the English default.\n */\n rankLabel?: (rank: number) => string\n /** Ranked tile top offsets, cycled. */\n rankOffsets?: readonly number[]\n /** Ranked tiles overlap by this many px, centred. */\n overlap?: number\n /** Edge to edge: no inset, square corners. */\n fullBleed?: boolean\n /**\n * Optional element rendered below the logo row (e.g. a `<StatusPill>`).\n * Figma: a status stacked beneath the logos on the slot.\n */\n footer?: ReactNode\n sx?: SxProps\n}\n\n// Default accessible label for a rank badge. Hoisted to a stable reference so\n// it isn't re-created each render (consumers override via the `rankLabel` prop,\n// e.g. with localized copy).\nconst defaultRankLabel = (rank: number) => `Rank ${rank}`\n\n// Non-ranked (MSA V2): tiles cascade via counter-axis alignment in a 112 zone\n// (tops 0/20/40).\nconst STAGGER_ALIGN = ['flex-start', 'center', 'flex-end'] as const\nconst STAGGER_STEP = 20\n// Ranked (Top Merchant V3): exact Figma logo top-offsets within the 122 `Logos`\n// content zone (logo2 bottom leaves ~7px). Not a uniform step, so use the\n// measured values rather than alignSelf.\nconst RANK_TILE_OFFSETS = [10, 25, 43] as const\nconst RANK_ROW_HEIGHT = 122\n// Figma: the rank badge overhangs the logo's top-left by 10px left / 8px up.\n// The row reserves the left overhang once (so the first badge stays inside the\n// card edge); the badge itself is offset by it via the MUI transform below.\nconst RANK_BADGE_OVERHANG = { x: 10, y: 8 } as const\n\n// Figma rank badge on MUI `Badge`: a 24px pure-black disc, 1px white border,\n// white `body2` number, soft elevation shadow. MUI centers the badge on the\n// logo's corner (`translate(-50%,-50%)`); override the transform so its top-left\n// lands exactly 10px left / 8px above the logo (Figma's overhang).\nconst rankBadgeSx: SxProps<Theme> = {\n '& .MuiBadge-badge': {\n // Intentional: `common.black`/`common.white` are mode-INDEPENDENT in\n // createMXTheme (unlike `text.primary`/`primary.contrastText`, which flip\n // per theme). A white-on-black disc plus the white border below keeps the\n // badge legible in BOTH light and dark mode — this is the dark-mode FIX, not\n // a bug. Do not \"theme-aware\"-ify these colors; it would break the Figma\n // look in light mode for no gain (the number sits on the always-black disc,\n // never on the surface).\n bgcolor: 'common.black',\n border: '1px solid',\n borderColor: 'common.white',\n borderRadius: '999px',\n boxShadow: (theme: Theme) => getLogoElevation(theme),\n color: 'common.white',\n // Figma number is `typography/body2` (13px / regular), not MUI's badge\n // default (12px / medium).\n fontSize: (theme: Theme) => theme.typography.body2.fontSize,\n fontWeight: (theme: Theme) => theme.typography.fontWeightRegular,\n height: 24,\n minWidth: 24,\n padding: 0,\n transform: `translate(-${RANK_BADGE_OVERHANG.x}px, -${RANK_BADGE_OVERHANG.y}px)`,\n },\n}\n\n/**\n * A row of rounded brand/logo tiles on a card surface, diagonally staggered\n * (top -> center -> bottom). Figma: Monthly Subscription Aggregate V2.\n */\nconst LogoClusterCard = ({\n background,\n footer,\n fullBleed = false,\n logoSize = 72,\n logos,\n overlap,\n ranked = false,\n rankLabel = defaultRankLabel,\n rankOffsets = RANK_TILE_OFFSETS,\n stagger = true,\n sx,\n}: LogoClusterCardProps) => {\n // Non-ranked cascades via alignSelf in a `logoSize + span` zone. Ranked uses\n // the exact Figma offsets in the 122 zone (its cascade isn't a uniform step).\n const staggerSpan = stagger ? (STAGGER_ALIGN.length - 1) * STAGGER_STEP : 0\n const rowHeight = ranked ? RANK_ROW_HEIGHT : logoSize + staggerSpan\n // Figma `Logos` frame side padding: 32 for MSA V2, 16 for the ranked cluster.\n const rowPaddingX = ranked ? (fullBleed ? 24 : 16) : 32\n const overlapping = ranked && overlap !== undefined\n\n return (\n <Stack sx={{ pt: fullBleed ? 0 : 8, px: fullBleed ? 0 : 16, width: '100%', ...sx }}>\n <Stack\n sx={{\n alignItems: 'center',\n background: background ?? undefined,\n bgcolor: background ? undefined : 'background.paper',\n borderRadius: fullBleed ? 0 : '8px',\n gap: 12,\n // Card (Figma `Wrapper`) has no horizontal padding of its own — the\n // logo row carries its side padding (`rowPaddingX`); only vertical.\n py: 16,\n width: '100%',\n }}\n >\n <Stack\n sx={{\n alignItems: 'flex-start',\n flexDirection: 'row',\n // Both variants use Figma's SPACE_BETWEEN (fills the row). Ranked\n // items reserve the badge overhang (below), so this yields Figma's\n // 26/18 side insets and ~14px visible gaps; MSA yields ~3px gaps.\n justifyContent: overlapping ? 'center' : 'space-between',\n isolation: overlapping ? 'isolate' : undefined,\n height: rowHeight,\n px: rowPaddingX,\n width: '100%',\n }}\n >\n {logos.map((logo, index) => {\n const tile = (\n <LogoTile borderColor=\"divider\" shadow=\"elevation\" size={logoSize}>\n {logo}\n </LogoTile>\n )\n // Ranked: offset each tile to its exact Figma top and size the item\n // to Figma's badge-inclusive box (72 logo + 10 left overhang + 2\n // right = 84), with the logo pushed right by the overhang. Then\n // SPACE_BETWEEN reproduces the 26/18 side insets and 14px gaps.\n // Non-ranked: cascade via alignSelf in the stagger zone.\n const positionSx = ranked\n ? {\n boxSizing: 'border-box' as const,\n mt: rankOffsets[index % rankOffsets.length],\n pl: RANK_BADGE_OVERHANG.x,\n width: logoSize + RANK_BADGE_OVERHANG.x + 2,\n ...(overlapping && {\n ml: index ? `${-(RANK_BADGE_OVERHANG.x + 2 + overlap)}px` : 0,\n position: 'relative' as const,\n zIndex: index + 1,\n }),\n }\n : { alignSelf: stagger ? STAGGER_ALIGN[index % STAGGER_ALIGN.length] : 'center' }\n\n return (\n // Index key is fine: the caller-supplied list is static.\n <Box\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n sx={positionSx}\n >\n {ranked ? (\n <Badge\n anchorOrigin={{ horizontal: 'left', vertical: 'top' }}\n aria-label={rankLabel(index + 1)}\n // `role=\"img\"` gives the root span a role that supports an\n // accessible name, so aria-label is surfaced to AT (a bare\n // generic span's aria-label is not announced).\n role=\"img\"\n // Hide the visible number from AT so the badge is announced\n // once via aria-label (\"Rank 1\"), not twice (\"Rank 1 … 1\").\n badgeContent={<span aria-hidden={true}>{index + 1}</span>}\n overlap=\"rectangular\"\n sx={rankBadgeSx}\n >\n {tile}\n </Badge>\n ) : (\n tile\n )}\n </Box>\n )\n })}\n </Stack>\n {footer && <Box sx={{ px: 16, width: '100%' }}>{footer}</Box>}\n </Stack>\n </Stack>\n )\n}\n\nexport default LogoClusterCard\n"],"mappings":";;;;;;AAoDA,IAAM,IAAA,CAAoB,MAAiB,QAAQ,CAAA,IAI7C,IAAgB;AAAA,EAAC;AAAA,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AAA,GACN,KAAU,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,IAAI;AAAA,UAAI,OAAO;AAAA,QAAO;AAAA,QAAI,UAAA;AAAA,MAAY,CAAA,CACvD;AAAA;EACF,CAAA;AAEX"}
@@ -7,8 +7,10 @@ interface LogoTileProps {
7
7
  size?: number;
8
8
  /** Surface color token. */
9
9
  bgcolor?: string;
10
- /** Border color token. */
11
- borderColor?: string;
10
+ /** Border color token; `null` draws no border. */
11
+ borderColor?: string | null;
12
+ /** Corner radius in px. Default 8 (`borderRadiusLarge`). */
13
+ borderRadius?: number;
12
14
  /**
13
15
  * Drop-shadow: `'offset'`/`true` = hard bottom-right (merchant, P2P);
14
16
  * `'elevation'` = soft `0 2px 8px`; `false` (default) = none.
@@ -23,9 +25,9 @@ interface LogoTileProps {
23
25
  }
24
26
  /**
25
27
  * The shared rounded brand/logo tile primitive (MerchantHighlightCard,
26
- * P2PLogoStack, LogoClusterCard): fixed square, 1px border, optional shadow.
28
+ * P2PLogoStack, LogoClusterCard): fixed square, optional border and shadow.
27
29
  * Named `LogoTile` (not `MerchantLogo`) to avoid colliding with MXUI's
28
30
  * `MerchantLogo` export.
29
31
  */
30
- declare const LogoTile: ({ bgcolor, borderColor, children, reserveShadowSpace, shadow, size, sx, }: LogoTileProps) => import("react/jsx-runtime").JSX.Element;
32
+ declare const LogoTile: ({ bgcolor, borderColor, borderRadius, children, reserveShadowSpace, shadow, size, sx, }: LogoTileProps) => import("react/jsx-runtime").JSX.Element;
31
33
  export default LogoTile;
@@ -1,34 +1,36 @@
1
- import { LOGO_SHADOW_OFFSET as r, getLogoElevation as s, getLogoShadow as x } from "./logoShadow.es.js";
1
+ import { LOGO_SHADOW_OFFSET as i, getLogoElevation as m, getLogoShadow as p } from "./logoShadow.es.js";
2
2
  import { jsx as d } from "react/jsx-runtime";
3
- import m from "@mui/material/Box";
4
- var b = ({ bgcolor: i = "background.paper", borderColor: n = "common.white", children: a, reserveShadowSpace: f = !0, shadow: o = !1, size: e = 64, sx: l }) => {
5
- const t = o === !0 || o === "offset";
6
- return /* @__PURE__ */ d(m, {
3
+ import g from "@mui/material/Box";
4
+ var S = ({ bgcolor: n = "background.paper", borderColor: e = "common.white", borderRadius: a = 8, children: f, reserveShadowSpace: l = !0, shadow: o = !1, size: t = 64, sx: x }) => {
5
+ const r = o === !0 || o === "offset", s = o === "elevation";
6
+ return /* @__PURE__ */ d(g, {
7
7
  sx: {
8
8
  alignItems: "center",
9
- bgcolor: i,
10
- borderRadius: "8px",
9
+ bgcolor: n,
10
+ borderRadius: `${a}px`,
11
11
  display: "flex",
12
12
  flexShrink: 0,
13
- height: e,
13
+ height: t,
14
14
  justifyContent: "center",
15
15
  overflow: "hidden",
16
- width: e,
17
- border: "1px solid",
18
- borderColor: n,
19
- ...t && { boxShadow: x },
20
- ...o === "elevation" && { boxShadow: s },
21
- ...t && f && {
22
- mr: `${r.x}px`,
23
- mb: `${r.y}px`
16
+ width: t,
17
+ ...e !== null && {
18
+ border: "1px solid",
19
+ borderColor: e
24
20
  },
25
- ...l
21
+ ...r && { boxShadow: p },
22
+ ...s && { boxShadow: m },
23
+ ...r && l && {
24
+ mr: `${i.x}px`,
25
+ mb: `${i.y}px`
26
+ },
27
+ ...x
26
28
  },
27
- children: a
29
+ children: f
28
30
  });
29
31
  };
30
32
  export {
31
- b as default
33
+ S as default
32
34
  };
33
35
 
34
36
  //# sourceMappingURL=LogoTile.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LogoTile.es.js","names":[],"sources":["../../../src/insights-v2/components/LogoTile.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { getLogoElevation, getLogoShadow, LOGO_SHADOW_OFFSET } from './logoShadow'\n\ninterface LogoTileProps {\n /** Logo/brand visual (arbitrary children). */\n children: ReactNode\n /** Square size in px. */\n size?: number\n /** Surface color token. */\n bgcolor?: string\n /** Border color token. */\n borderColor?: string\n /**\n * Drop-shadow: `'offset'`/`true` = hard bottom-right (merchant, P2P);\n * `'elevation'` = soft `0 2px 8px`; `false` (default) = none.\n */\n shadow?: boolean | 'offset' | 'elevation'\n /**\n * Reserve layout space for the offset shadow (margin = shadow offset) so a\n * sibling flex `gap` clears it. Default true; ignored unless shadow is offset.\n */\n reserveShadowSpace?: boolean\n sx?: SxProps\n}\n\n/**\n * The shared rounded brand/logo tile primitive (MerchantHighlightCard,\n * P2PLogoStack, LogoClusterCard): fixed square, 1px border, optional shadow.\n * Named `LogoTile` (not `MerchantLogo`) to avoid colliding with MXUI's\n * `MerchantLogo` export.\n */\nconst LogoTile = ({\n bgcolor = 'background.paper',\n borderColor = 'common.white',\n children,\n reserveShadowSpace = true,\n shadow = false,\n size = 64,\n sx,\n}: LogoTileProps) => {\n const isOffset = shadow === true || shadow === 'offset'\n const isElevation = shadow === 'elevation'\n\n return (\n <Box\n sx={{\n alignItems: 'center',\n bgcolor,\n borderRadius: '8px',\n display: 'flex',\n flexShrink: 0,\n height: size,\n justifyContent: 'center',\n overflow: 'hidden',\n width: size,\n border: '1px solid',\n borderColor,\n ...(isOffset && { boxShadow: getLogoShadow }),\n ...(isElevation && { boxShadow: getLogoElevation }),\n // The offset box-shadow paints outside the box; reserve its footprint so\n // a flex gap starts from the shadow's outer edge, not the tile border.\n // (The soft elevation shadow is symmetric and needs no reservation.)\n ...(isOffset &&\n reserveShadowSpace && {\n mr: `${LOGO_SHADOW_OFFSET.x}px`,\n mb: `${LOGO_SHADOW_OFFSET.y}px`,\n }),\n ...sx,\n }}\n >\n {children}\n </Box>\n )\n}\n\nexport default LogoTile\n"],"mappings":";;;AAmCA,IAAM,IAAA,CAAY,EAChB,SAAA,IAAU,oBACV,aAAA,IAAc,gBACd,UAAA,GACA,oBAAA,IAAqB,IACrB,QAAA,IAAS,IACT,MAAA,IAAO,IACP,IAAA,EAAA,MACmB;AACnB,QAAM,IAAW,MAAW,MAAQ,MAAW;AAG/C,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,SAAA;AAAA,MACA,cAAc;AAAA,MACd,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,aAAA;AAAA,MACA,GAAI,KAAY,EAAE,WAAW,EAAc;AAAA,MAC3C,GAjBc,MAAW,eAiBN,EAAE,WAAW,EAAiB;AAAA,MAIjD,GAAI,KACF,KAAsB;AAAA,QACpB,IAAI,GAAG,EAAmB,CAAA;AAAA,QAC1B,IAAI,GAAG,EAAmB,CAAA;AAAA,MAC5B;AAAA,MACF,GAAG;AAAA,IACL;AAAA,IAEC,UAAA;AAAA,EACE,CAAA;AAET"}
1
+ {"version":3,"file":"LogoTile.es.js","names":[],"sources":["../../../src/insights-v2/components/LogoTile.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { getLogoElevation, getLogoShadow, LOGO_SHADOW_OFFSET } from './logoShadow'\n\ninterface LogoTileProps {\n /** Logo/brand visual (arbitrary children). */\n children: ReactNode\n /** Square size in px. */\n size?: number\n /** Surface color token. */\n bgcolor?: string\n /** Border color token; `null` draws no border. */\n borderColor?: string | null\n /** Corner radius in px. Default 8 (`borderRadiusLarge`). */\n borderRadius?: number\n /**\n * Drop-shadow: `'offset'`/`true` = hard bottom-right (merchant, P2P);\n * `'elevation'` = soft `0 2px 8px`; `false` (default) = none.\n */\n shadow?: boolean | 'offset' | 'elevation'\n /**\n * Reserve layout space for the offset shadow (margin = shadow offset) so a\n * sibling flex `gap` clears it. Default true; ignored unless shadow is offset.\n */\n reserveShadowSpace?: boolean\n sx?: SxProps\n}\n\n/**\n * The shared rounded brand/logo tile primitive (MerchantHighlightCard,\n * P2PLogoStack, LogoClusterCard): fixed square, optional border and shadow.\n * Named `LogoTile` (not `MerchantLogo`) to avoid colliding with MXUI's\n * `MerchantLogo` export.\n */\nconst LogoTile = ({\n bgcolor = 'background.paper',\n borderColor = 'common.white',\n borderRadius = 8,\n children,\n reserveShadowSpace = true,\n shadow = false,\n size = 64,\n sx,\n}: LogoTileProps) => {\n const isOffset = shadow === true || shadow === 'offset'\n const isElevation = shadow === 'elevation'\n\n return (\n <Box\n sx={{\n alignItems: 'center',\n bgcolor,\n borderRadius: `${borderRadius}px`,\n display: 'flex',\n flexShrink: 0,\n height: size,\n justifyContent: 'center',\n overflow: 'hidden',\n width: size,\n ...(borderColor !== null && { border: '1px solid', borderColor }),\n ...(isOffset && { boxShadow: getLogoShadow }),\n ...(isElevation && { boxShadow: getLogoElevation }),\n // The offset box-shadow paints outside the box; reserve its footprint so\n // a flex gap starts from the shadow's outer edge, not the tile border.\n // (The soft elevation shadow is symmetric and needs no reservation.)\n ...(isOffset &&\n reserveShadowSpace && {\n mr: `${LOGO_SHADOW_OFFSET.x}px`,\n mb: `${LOGO_SHADOW_OFFSET.y}px`,\n }),\n ...sx,\n }}\n >\n {children}\n </Box>\n )\n}\n\nexport default LogoTile\n"],"mappings":";;;AAqCA,IAAM,IAAA,CAAY,EAChB,SAAA,IAAU,oBACV,aAAA,IAAc,gBACd,cAAA,IAAe,GACf,UAAA,GACA,oBAAA,IAAqB,IACrB,QAAA,IAAS,IACT,MAAA,IAAO,IACP,IAAA,EAAA,MACmB;AACnB,QAAM,IAAW,MAAW,MAAQ,MAAW,UACzC,IAAc,MAAW;AAE/B,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,SAAA;AAAA,MACA,cAAc,GAAG,CAAA;AAAA,MACjB,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,OAAO;AAAA,MACP,GAAI,MAAgB,QAAQ;AAAA,QAAE,QAAQ;AAAA,QAAa,aAAA;AAAA,MAAY;AAAA,MAC/D,GAAI,KAAY,EAAE,WAAW,EAAc;AAAA,MAC3C,GAAI,KAAe,EAAE,WAAW,EAAiB;AAAA,MAIjD,GAAI,KACF,KAAsB;AAAA,QACpB,IAAI,GAAG,EAAmB,CAAA;AAAA,QAC1B,IAAI,GAAG,EAAmB,CAAA;AAAA,MAC5B;AAAA,MACF,GAAG;AAAA,IACL;AAAA,IAEC,UAAA;AAAA,EACE,CAAA;AAET"}
@@ -21,8 +21,13 @@ interface MerchantHighlightCardProps {
21
21
  background?: string;
22
22
  /** Card border color token (e.g. New Merchant's tinted card). */
23
23
  borderColor?: string;
24
- /** Render the logo's drop-shadow. Default true; false for MSA V2's Visual. */
25
- logoShadow?: boolean;
24
+ /** Logo tile shadow (see `LogoTile`). Default offset. */
25
+ logoShadow?: boolean | 'offset' | 'elevation';
26
+ logoSize?: number;
27
+ logoBorderColor?: string | null;
28
+ logoRadius?: number;
29
+ /** Edge to edge: no side inset, square corners. */
30
+ fullBleed?: boolean;
26
31
  sx?: SxProps;
27
32
  }
28
33
  /**
@@ -30,5 +35,5 @@ interface MerchantHighlightCardProps {
30
35
  * eyebrow, name, amount/trailing). Shared by Peer-to-Peer Categorization, New
31
36
  * Merchant, and Monthly Subscription Aggregate V2's Visual state.
32
37
  */
33
- declare const MerchantHighlightCard: ({ amount, amountVariant, background, bgcolor, borderColor, eyebrow, logo, logoShadow, name, nameVariant, trailing, sx, }: MerchantHighlightCardProps) => import("react/jsx-runtime").JSX.Element;
38
+ declare const MerchantHighlightCard: ({ amount, amountVariant, background, bgcolor, borderColor, eyebrow, fullBleed, logo, logoBorderColor, logoRadius, logoShadow, logoSize, name, nameVariant, trailing, sx, }: MerchantHighlightCardProps) => import("react/jsx-runtime").JSX.Element;
34
39
  export default MerchantHighlightCard;
@@ -1,22 +1,22 @@
1
- import v from "./LogoTile.es.js";
2
- import w from "./AmountPill.es.js";
1
+ import j from "./LogoTile.es.js";
2
+ import N from "./AmountPill.es.js";
3
3
  import i from "@mui/material/Stack";
4
- import { Text as l } from "@mxenabled/mxui";
5
- import { jsx as r, jsxs as c } from "react/jsx-runtime";
6
- var A = ({ amount: t, amountVariant: o = "text", background: n, bgcolor: h = "grey.200", borderColor: d, eyebrow: a, logo: p, logoShadow: s = !0, name: x, nameVariant: m, trailing: u, sx: f }) => {
7
- const g = m ?? (o === "pill" ? "h2" : "h3");
8
- let e = u;
9
- return e == null && t != null && (e = o === "pill" ? /* @__PURE__ */ r(w, { children: t }) : /* @__PURE__ */ r(l, {
4
+ import { Text as o } from "@mxenabled/mxui";
5
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
6
+ var C = ({ amount: t, amountVariant: l = "text", background: n, bgcolor: h = "grey.200", borderColor: d, eyebrow: a, fullBleed: c = !1, logo: p, logoBorderColor: x, logoRadius: m, logoShadow: f = !0, logoSize: u, name: g, nameVariant: v, trailing: w, sx: y }) => {
7
+ const b = v ?? (l === "pill" ? "h2" : "h3");
8
+ let e = w;
9
+ return e == null && t != null && (e = l === "pill" ? /* @__PURE__ */ r(N, { children: t }) : /* @__PURE__ */ r(o, {
10
10
  color: "text.secondary",
11
11
  variant: "body1",
12
12
  children: t
13
13
  })), /* @__PURE__ */ r(i, {
14
14
  sx: {
15
- px: 16,
15
+ px: c ? 0 : 16,
16
16
  width: "100%",
17
- ...f
17
+ ...y
18
18
  },
19
- children: /* @__PURE__ */ c(i, {
19
+ children: /* @__PURE__ */ s(i, {
20
20
  sx: {
21
21
  alignItems: "center",
22
22
  ...n ? { background: n } : { bgcolor: h },
@@ -24,32 +24,35 @@ var A = ({ amount: t, amountVariant: o = "text", background: n, bgcolor: h = "gr
24
24
  border: "1px solid",
25
25
  borderColor: d
26
26
  },
27
- borderRadius: "8px",
27
+ borderRadius: c ? 0 : "8px",
28
28
  flexDirection: "row",
29
29
  gap: 16,
30
30
  p: 16,
31
31
  width: "100%"
32
32
  },
33
- children: [/* @__PURE__ */ r(v, {
34
- shadow: s,
33
+ children: [/* @__PURE__ */ r(j, {
34
+ borderColor: x,
35
+ borderRadius: m,
36
+ shadow: f,
37
+ size: u,
35
38
  children: p
36
- }), /* @__PURE__ */ c(i, {
39
+ }), /* @__PURE__ */ s(i, {
37
40
  sx: {
38
41
  gap: 2,
39
42
  minWidth: 0
40
43
  },
41
44
  children: [
42
- a && /* @__PURE__ */ r(l, {
45
+ a && /* @__PURE__ */ r(o, {
43
46
  color: "text.secondary",
44
47
  truncate: !0,
45
48
  variant: "caption",
46
49
  children: a
47
50
  }),
48
- /* @__PURE__ */ r(l, {
49
- bold: !0,
51
+ /* @__PURE__ */ r(o, {
52
+ sx: { fontWeight: 700 },
50
53
  truncate: !0,
51
- variant: g,
52
- children: x
54
+ variant: b,
55
+ children: g
53
56
  }),
54
57
  e
55
58
  ]
@@ -58,7 +61,7 @@ var A = ({ amount: t, amountVariant: o = "text", background: n, bgcolor: h = "gr
58
61
  });
59
62
  };
60
63
  export {
61
- A as default
64
+ C as default
62
65
  };
63
66
 
64
67
  //# sourceMappingURL=MerchantHighlightCard.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MerchantHighlightCard.es.js","names":[],"sources":["../../../src/insights-v2/components/MerchantHighlightCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport AmountPill from './AmountPill'\nimport LogoTile from './LogoTile'\n\ninterface MerchantHighlightCardProps {\n /** Brand/merchant logo visual (rendered inside a `LogoTile`). */\n logo: ReactNode\n /** Merchant/payee name. */\n name: ReactNode\n /** Optional label above the name (e.g. \"{Date}\"). */\n eyebrow?: ReactNode\n /** Amount. Rendered as a dark pill when `amountVariant='pill'`, else plain. */\n amount?: ReactNode\n /** How to render the amount. */\n amountVariant?: 'pill' | 'text'\n /** Typography variant for the name. Defaults to `h2` for `pill`, else `h3`. */\n nameVariant?: 'h2' | 'h3'\n /** Trailing element beneath the name (e.g. a `<StatusPill>`); replaces `amount`. */\n trailing?: ReactNode\n /** Card surface color token. */\n bgcolor?: string\n /** CSS background (e.g. a gradient) for the card surface; overrides `bgcolor`. */\n background?: string\n /** Card border color token (e.g. New Merchant's tinted card). */\n borderColor?: string\n /** Render the logo's drop-shadow. Default true; false for MSA V2's Visual. */\n logoShadow?: boolean\n sx?: SxProps\n}\n\n/**\n * A merchant/brand highlight card: a `LogoTile` beside a text column (optional\n * eyebrow, name, amount/trailing). Shared by Peer-to-Peer Categorization, New\n * Merchant, and Monthly Subscription Aggregate V2's Visual state.\n */\nconst MerchantHighlightCard = ({\n amount,\n amountVariant = 'text',\n background,\n bgcolor = 'grey.200',\n borderColor,\n eyebrow,\n logo,\n logoShadow = true,\n name,\n nameVariant,\n trailing,\n sx,\n}: MerchantHighlightCardProps) => {\n const resolvedNameVariant = nameVariant ?? (amountVariant === 'pill' ? 'h2' : 'h3')\n\n // `trailing` (e.g. a StatusPill) takes the amount's slot when provided;\n // otherwise render the amount as a dark pill or plain text.\n let amountNode: ReactNode = trailing\n if (amountNode == null && amount != null) {\n amountNode =\n amountVariant === 'pill' ? (\n <AmountPill>{amount}</AmountPill>\n ) : (\n <Text color=\"text.secondary\" variant=\"body1\">\n {amount}\n </Text>\n )\n }\n\n return (\n <Stack sx={{ px: 16, width: '100%', ...sx }}>\n <Stack\n sx={{\n alignItems: 'center',\n ...(background ? { background } : { bgcolor }),\n ...(borderColor && { border: '1px solid', borderColor }),\n borderRadius: '8px',\n flexDirection: 'row',\n gap: 16,\n p: 16,\n width: '100%',\n }}\n >\n <LogoTile shadow={logoShadow}>{logo}</LogoTile>\n <Stack sx={{ gap: 2, minWidth: 0 }}>\n {eyebrow && (\n <Text color=\"text.secondary\" truncate={true} variant=\"caption\">\n {eyebrow}\n </Text>\n )}\n <Text bold={true} truncate={true} variant={resolvedNameVariant}>\n {name}\n </Text>\n {amountNode}\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default MerchantHighlightCard\n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AA,UAER,gBAAA,EAAC,GAAD;AAAA,YAAM,MAAM;AAAA,YAAM,UAAU;AAAA,YAAM,SAAS;AAAA,YACxC,UAAA;AAAA,UACG,CAAA;AAAA,UACL;AAAA,QACI;AAAA,MACF,CAAA,CAAA;AAAA;EACF,CAAA;AAEX"}
1
+ {"version":3,"file":"MerchantHighlightCard.es.js","names":[],"sources":["../../../src/insights-v2/components/MerchantHighlightCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport AmountPill from './AmountPill'\nimport LogoTile from './LogoTile'\n\ninterface MerchantHighlightCardProps {\n /** Brand/merchant logo visual (rendered inside a `LogoTile`). */\n logo: ReactNode\n /** Merchant/payee name. */\n name: ReactNode\n /** Optional label above the name (e.g. \"{Date}\"). */\n eyebrow?: ReactNode\n /** Amount. Rendered as a dark pill when `amountVariant='pill'`, else plain. */\n amount?: ReactNode\n /** How to render the amount. */\n amountVariant?: 'pill' | 'text'\n /** Typography variant for the name. Defaults to `h2` for `pill`, else `h3`. */\n nameVariant?: 'h2' | 'h3'\n /** Trailing element beneath the name (e.g. a `<StatusPill>`); replaces `amount`. */\n trailing?: ReactNode\n /** Card surface color token. */\n bgcolor?: string\n /** CSS background (e.g. a gradient) for the card surface; overrides `bgcolor`. */\n background?: string\n /** Card border color token (e.g. New Merchant's tinted card). */\n borderColor?: string\n /** Logo tile shadow (see `LogoTile`). Default offset. */\n logoShadow?: boolean | 'offset' | 'elevation'\n logoSize?: number\n logoBorderColor?: string | null\n logoRadius?: number\n /** Edge to edge: no side inset, square corners. */\n fullBleed?: boolean\n sx?: SxProps\n}\n\n/**\n * A merchant/brand highlight card: a `LogoTile` beside a text column (optional\n * eyebrow, name, amount/trailing). Shared by Peer-to-Peer Categorization, New\n * Merchant, and Monthly Subscription Aggregate V2's Visual state.\n */\nconst MerchantHighlightCard = ({\n amount,\n amountVariant = 'text',\n background,\n bgcolor = 'grey.200',\n borderColor,\n eyebrow,\n fullBleed = false,\n logo,\n logoBorderColor,\n logoRadius,\n logoShadow = true,\n logoSize,\n name,\n nameVariant,\n trailing,\n sx,\n}: MerchantHighlightCardProps) => {\n const resolvedNameVariant = nameVariant ?? (amountVariant === 'pill' ? 'h2' : 'h3')\n\n // `trailing` (e.g. a StatusPill) takes the amount's slot when provided;\n // otherwise render the amount as a dark pill or plain text.\n let amountNode: ReactNode = trailing\n if (amountNode == null && amount != null) {\n amountNode =\n amountVariant === 'pill' ? (\n <AmountPill>{amount}</AmountPill>\n ) : (\n <Text color=\"text.secondary\" variant=\"body1\">\n {amount}\n </Text>\n )\n }\n\n return (\n <Stack sx={{ px: fullBleed ? 0 : 16, width: '100%', ...sx }}>\n <Stack\n sx={{\n alignItems: 'center',\n ...(background ? { background } : { bgcolor }),\n ...(borderColor && { border: '1px solid', borderColor }),\n borderRadius: fullBleed ? 0 : '8px',\n flexDirection: 'row',\n gap: 16,\n p: 16,\n width: '100%',\n }}\n >\n <LogoTile\n borderColor={logoBorderColor}\n borderRadius={logoRadius}\n shadow={logoShadow}\n size={logoSize}\n >\n {logo}\n </LogoTile>\n <Stack sx={{ gap: 2, minWidth: 0 }}>\n {eyebrow && (\n <Text color=\"text.secondary\" truncate={true} variant=\"caption\">\n {eyebrow}\n </Text>\n )}\n {/* mxui's `bold` forces 600. */}\n <Text sx={{ fontWeight: 700 }} truncate={true} variant={resolvedNameVariant}>\n {name}\n </Text>\n {amountNode}\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default MerchantHighlightCard\n"],"mappings":";;;;;AA8CA,IAAM,IAAA,CAAyB,EAC7B,QAAA,GACA,eAAA,IAAgB,QAChB,YAAA,GACA,SAAA,IAAU,YACV,aAAA,GACA,SAAA,GACA,WAAA,IAAY,IACZ,MAAA,GACA,iBAAA,GACA,YAAA,GACA,YAAA,IAAa,IACb,UAAA,GACA,MAAA,GACA,aAAA,GACA,UAAA,GACA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AAA;AAAA,UACG,CAAA;AAAA,UACL;AAAA,QACI;AAAA,MACF,CAAA,CAAA;AAAA;EACF,CAAA;AAEX"}
@@ -8,8 +8,14 @@ interface P2PLogoStackProps {
8
8
  * tile becomes a "+N" more indicator. Defaults to `logos.length`.
9
9
  */
10
10
  total?: number;
11
+ /** Tile border token; `null` draws none. */
12
+ borderColor?: string | null;
11
13
  /** Logo tile size in px (Figma: 64). */
12
14
  size?: number;
15
+ /** Tile shadow (see `LogoTile`). Default offset. */
16
+ shadow?: boolean | 'offset' | 'elevation';
17
+ /** Overlap px; centred, right-most tile on top. */
18
+ overlap?: number;
13
19
  /**
14
20
  * Fixed height of the cascading row in px (Figma `Logos` frame: 106). Gives
15
21
  * the staircase `mt` offsets room without collapsing.
@@ -28,5 +34,5 @@ interface P2PLogoStackProps {
28
34
  * (Peer-to-Peer Categorization). Layout math ported locally from v1
29
35
  * `shared/P2P/P2PMultipleCategorization`.
30
36
  */
31
- declare const P2PLogoStack: ({ logos, rowHeight, size, status, total, sx, }: P2PLogoStackProps) => import("react/jsx-runtime").JSX.Element;
37
+ declare const P2PLogoStack: ({ logos, borderColor, overlap, rowHeight, shadow, size, status, total, sx, }: P2PLogoStackProps) => import("react/jsx-runtime").JSX.Element;
32
38
  export default P2PLogoStack;
@@ -1,8 +1,8 @@
1
- import u from "./LogoTile.es.js";
2
- import i from "@mui/material/Stack";
3
- import { Text as w } from "@mxenabled/mxui";
4
- import { jsx as S, jsxs as c } from "react/jsx-runtime";
5
- var v = {
1
+ import T from "./LogoTile.es.js";
2
+ import p from "@mui/material/Stack";
3
+ import { Text as k } from "@mxenabled/mxui";
4
+ import { jsx as b, jsxs as s } from "react/jsx-runtime";
5
+ var j = {
6
6
  2: [0, 36],
7
7
  3: [
8
8
  0,
@@ -15,41 +15,49 @@ var v = {
15
15
  24,
16
16
  36
17
17
  ]
18
- }, j = ({ logos: o, rowHeight: l = 106, size: h = 64, status: m, total: p, sx: f }) => {
19
- const n = p ?? o.length, t = n >= 4, r = t ? o.slice(0, 3) : o.slice(0, 4), d = v[t ? 4 : Math.min(Math.max(r.length, 2), 3)], g = t ? r.length + 1 : r.length, s = (a, e, x) => /* @__PURE__ */ S(u, {
20
- bgcolor: x,
21
- borderColor: "background.paper",
22
- reserveShadowSpace: e === g - 1,
23
- shadow: !0,
24
- size: h,
25
- sx: { mt: `${d?.[e] ?? 0}px` },
26
- children: a
27
- }, e);
28
- return /* @__PURE__ */ c(i, {
18
+ }, F = ({ logos: n, borderColor: h = "background.paper", overlap: l, rowHeight: m = 106, shadow: f = !0, size: g = 64, status: x, total: u, sx: d }) => {
19
+ const o = l != null, a = u ?? n.length, e = a >= 4, r = e ? n.slice(0, 3) : n.slice(0, 4), v = j[e ? 4 : Math.min(Math.max(r.length, 2), 3)], S = e ? r.length + 1 : r.length, c = (i, t, w) => /* @__PURE__ */ b(T, {
20
+ bgcolor: w,
21
+ borderColor: h,
22
+ reserveShadowSpace: t === S - 1,
23
+ shadow: f,
24
+ size: g,
25
+ sx: {
26
+ mt: `${v?.[t] ?? 0}px`,
27
+ ...o && {
28
+ ml: t ? `-${l}px` : 0,
29
+ position: "relative",
30
+ zIndex: t + 1
31
+ }
32
+ },
33
+ children: i
34
+ }, t);
35
+ return /* @__PURE__ */ s(p, {
29
36
  sx: {
30
37
  gap: 12,
31
38
  width: "100%",
32
- ...f
39
+ ...d
33
40
  },
34
- children: [/* @__PURE__ */ c(i, {
41
+ children: [/* @__PURE__ */ s(p, {
35
42
  sx: {
36
43
  flexDirection: "row",
37
- gap: t ? 8 : 24,
38
- height: l,
39
- justifyContent: t ? "flex-start" : "center"
44
+ gap: o ? 0 : e ? 8 : 24,
45
+ height: m,
46
+ isolation: o ? "isolate" : void 0,
47
+ justifyContent: o || !e ? "center" : "flex-start"
40
48
  },
41
- children: [r.map((a, e) => s(a, e, "background.paper")), t && s(/* @__PURE__ */ c(w, {
42
- "aria-label": `+${n - 3} more`,
49
+ children: [r.map((i, t) => c(i, t, "background.paper")), e && c(/* @__PURE__ */ s(k, {
50
+ "aria-label": `+${a - 3} more`,
43
51
  component: "span",
44
52
  sx: { color: "common.white" },
45
53
  variant: "h3",
46
- children: ["+", n - 3]
54
+ children: ["+", a - 3]
47
55
  }), 3, "grey.800")]
48
- }), m]
56
+ }), x]
49
57
  });
50
58
  };
51
59
  export {
52
- j as default
60
+ F as default
53
61
  };
54
62
 
55
63
  //# sourceMappingURL=P2PLogoStack.es.js.map