@mx-cartographer/experiences 9.7.196 → 9.7.197

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 (23) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.d.ts +3 -1
  3. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.es.js +29 -21
  4. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.es.js.map +1 -1
  5. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.d.ts +3 -1
  6. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +68 -63
  7. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
  8. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +94 -91
  9. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  10. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +2 -0
  11. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +7 -5
  12. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
  13. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +59 -56
  14. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
  15. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +1 -1
  16. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +22 -11
  17. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
  18. package/dist/insights-v2/components/LogoClusterCard.es.js +9 -8
  19. package/dist/insights-v2/components/LogoClusterCard.es.js.map +1 -1
  20. package/dist/insights-v2/components/chartblocks/BarchartV2.d.ts +9 -1
  21. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js +109 -85
  22. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js.map +1 -1
  23. package/package.json +1 -1
@@ -15,7 +15,7 @@ var T = (o) => `Rank ${o}`, p = [
15
15
  ], L = 122, i = {
16
16
  x: 10,
17
17
  y: 8
18
- }, N = { "& .MuiBadge-badge": {
18
+ }, H = { "& .MuiBadge-badge": {
19
19
  bgcolor: "common.black",
20
20
  border: "1px solid",
21
21
  borderColor: "common.white",
@@ -23,13 +23,14 @@ var T = (o) => `Rank ${o}`, p = [
23
23
  boxShadow: (o) => E(o),
24
24
  color: "common.white",
25
25
  fontSize: (o) => o.typography.body2.fontSize,
26
- fontWeight: (o) => o.typography.fontWeightRegular,
26
+ fontWeight: (o) => o.typography.fontWeightBold,
27
+ lineHeight: "16px",
27
28
  height: 24,
28
29
  minWidth: 24,
29
30
  padding: 0,
30
31
  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;
32
+ } }, K = ({ 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 }) => {
33
+ const w = g ? (p.length - 1) * C : 0, S = e ? L : n + w, R = e ? a ? 24 : 16 : 32, l = e && h !== void 0;
33
34
  return /* @__PURE__ */ t(d, {
34
35
  sx: {
35
36
  pt: a ? 0 : 8,
@@ -53,8 +54,8 @@ var T = (o) => `Rank ${o}`, p = [
53
54
  flexDirection: "row",
54
55
  justifyContent: l ? "center" : "space-between",
55
56
  isolation: l ? "isolate" : void 0,
56
- height: R,
57
- px: S,
57
+ height: S,
58
+ px: R,
58
59
  width: "100%"
59
60
  },
60
61
  children: b.map((u, r) => {
@@ -88,7 +89,7 @@ var T = (o) => `Rank ${o}`, p = [
88
89
  children: r + 1
89
90
  }),
90
91
  overlap: "rectangular",
91
- sx: N,
92
+ sx: H,
92
93
  children: x
93
94
  }) : x
94
95
  }, r);
@@ -104,7 +105,7 @@ var T = (o) => `Rank ${o}`, p = [
104
105
  });
105
106
  };
106
107
  export {
107
- O as default
108
+ K as default
108
109
  };
109
110
 
110
111
  //# sourceMappingURL=LogoClusterCard.es.js.map
@@ -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 /** 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,EAAc;AAAA,EAAU;AAAU,GACnD,IAAe,IAIf,IA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K,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 bold 13/16 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 587:129812: the number is Inter Bold 13/16, not MUI's badge\n // default (12px / medium).\n fontSize: (theme: Theme) => theme.typography.body2.fontSize,\n fontWeight: (theme: Theme) => theme.typography.fontWeightBold,\n lineHeight: '16px',\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,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,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ts/BarChart';
2
- export declare const BarChartV2: ({ amounts, color, data, heightOverride, margin, onBarClick, legendPosition, monthlyAmountLabel, removeSelectedTabColorChange, selectedTabIndex, showMonthlyAmount, trendAmountLabel, unselectedOpacity, }: BarChartV2Props) => import("react/jsx-runtime").JSX.Element;
2
+ type BarChartProps = BarChartV2Props & {
3
+ /**
4
+ * Each bar is a focusable button (Enter / Space call `onBarClick`), for a chart that is the only way
5
+ * to pick a bar, e.g. a drawer without month tabs. Absent: bars are mouse-only.
6
+ */
7
+ keyboardSelectable?: boolean;
8
+ };
9
+ export declare const BarChartV2: ({ amounts, color, data, heightOverride, keyboardSelectable, margin, onBarClick, legendPosition, monthlyAmountLabel, removeSelectedTabColorChange, selectedTabIndex, showMonthlyAmount, trendAmountLabel, unselectedOpacity, }: BarChartProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,148 +1,172 @@
1
- import { useContainerDimensions as _ } from "../../../insights/hooks/useContainerDimensions.es.js";
2
- import { LegendV2 as j } from "../../../insights/components/shared/Charts/BarChart/ChartLegendV2.es.js";
3
- import { CustomBarPlotV2 as W } from "../../../insights/components/shared/Charts/BarChart/CustomBarPlotV2.es.js";
4
- import m from "react";
5
- import z from "@mui/material/Stack";
6
- import { jsx as o, jsxs as b } from "react/jsx-runtime";
7
- import { alpha as G, useTheme as N } from "@mui/material/styles";
8
- import X from "@mui/material/Box";
9
- import { BarPlot as Y, ChartContainer as $, ChartsReferenceLine as S, ChartsXAxis as q } from "@mui/x-charts";
10
- var P = ({ amounts: c, color: n, data: e, heightOverride: x, margin: a = {
1
+ import { useContainerDimensions as z } from "../../../insights/hooks/useContainerDimensions.es.js";
2
+ import { LegendV2 as G } from "../../../insights/components/shared/Charts/BarChart/ChartLegendV2.es.js";
3
+ import { CustomBarPlotV2 as K } from "../../../insights/components/shared/Charts/BarChart/CustomBarPlotV2.es.js";
4
+ import l from "react";
5
+ import N from "@mui/material/Stack";
6
+ import { jsx as i, jsxs as d } from "react/jsx-runtime";
7
+ import { alpha as X, useTheme as Y } from "@mui/material/styles";
8
+ import $ from "@mui/material/Box";
9
+ import { BarPlot as q, ChartContainer as E, ChartsReferenceLine as L, ChartsXAxis as F } from "@mui/x-charts";
10
+ var S = l.createContext(null), H = ({ ownerState: a, ...r }) => {
11
+ const t = l.useContext(S);
12
+ return t ? /* @__PURE__ */ i(K, {
13
+ ...r,
14
+ ...t,
15
+ dataIndex: a.dataIndex,
16
+ style: {
17
+ height: r.height,
18
+ x: r.x,
19
+ y: r.y,
20
+ width: r.width
21
+ }
22
+ }) : null;
23
+ }, et = ({ amounts: a, color: r, data: t, heightOverride: g, keyboardSelectable: p = !1, margin: h = {
11
24
  bottom: 30,
12
25
  left: 16,
13
26
  right: 16,
14
27
  top: 20
15
- }, onBarClick: d, legendPosition: h = "bottom", monthlyAmountLabel: y, removeSelectedTabColorChange: f, selectedTabIndex: s, showMonthlyAmount: v = !0, trendAmountLabel: g, unselectedOpacity: u }) => {
16
- const A = m.useRef(null), { height: R, width: B } = _(A), k = N(), C = m.useMemo(() => {
17
- const t = e.map(({ value: l }) => l), r = Math.min(...t), i = Math.max(...t);
28
+ }, onBarClick: f, legendPosition: u = "bottom", monthlyAmountLabel: k, removeSelectedTabColorChange: c, selectedTabIndex: o, showMonthlyAmount: V = !0, trendAmountLabel: C, unselectedOpacity: x }) => {
29
+ const v = l.useRef(null), { height: D, width: W } = z(v), y = Y(), M = l.useMemo(() => {
30
+ const e = t.map(({ value: m }) => m), n = Math.min(...e), s = Math.max(...e);
18
31
  return {
19
32
  series: [{
20
- data: t,
33
+ data: e,
21
34
  type: "bar"
22
35
  }],
23
36
  xAxis: [{
24
- data: e.map(({ label: l }) => l),
37
+ data: t.map(({ label: m }) => m),
25
38
  scaleType: "band",
26
39
  categoryGapRatio: 0.45
27
40
  }],
28
41
  yAxis: [{
29
42
  scaleType: "linear",
30
- min: r < 0 ? r * 1.2 : 0,
31
- max: i > 0 ? i : 0
43
+ min: n < 0 ? n * 1.2 : 0,
44
+ max: s > 0 ? s : 0
32
45
  }]
33
46
  };
34
- }, [e]), L = m.useMemo(() => {
35
- const t = u === void 0 ? `${n}80` : G(n, u);
36
- return f ? e.map(() => n) : s == null ? [...new Array(e.length - 1).fill(t), n] : e.map((r, i) => i === s ? n : t);
47
+ }, [t]), w = l.useMemo(() => {
48
+ const e = x === void 0 ? `${r}80` : X(r, x);
49
+ return c ? t.map(() => r) : o == null ? [...new Array(t.length - 1).fill(e), r] : t.map((n, s) => s === o ? r : e);
37
50
  }, [
38
- n,
39
- e,
40
- s,
41
- u
42
- ]), V = m.useMemo(() => e[s ?? e.length - 1], [e, s]), p = e.reduce((t, r) => Math.min(t, r.value), 1 / 0) < 0, w = /* @__PURE__ */ o(j, {
43
- color: n,
44
- legendStyle: { pl: a.left },
45
- monthlyAmount: v ? V.formattedAmount : void 0,
46
- monthlyAmountLabel: y,
47
- trendAmount: c?.formattedAverage,
48
- trendAmountLabel: g
49
- }), M = y || g, D = (t, { dataIndex: r }) => d?.(r);
50
- return /* @__PURE__ */ b(z, {
51
+ r,
52
+ t,
53
+ o,
54
+ x
55
+ ]), _ = l.useMemo(() => t[o ?? t.length - 1], [t, o]), A = t.reduce((e, n) => Math.min(e, n.value), 1 / 0) < 0, B = /* @__PURE__ */ i(G, {
56
+ color: r,
57
+ legendStyle: { pl: h.left },
58
+ monthlyAmount: V ? _.formattedAmount : void 0,
59
+ monthlyAmountLabel: k,
60
+ trendAmount: a?.formattedAverage,
61
+ trendAmountLabel: C
62
+ }), R = k || C, b = l.useMemo(() => ({
63
+ colorRange: w,
64
+ data: t,
65
+ onKeyboardSelect: p ? f : void 0,
66
+ removeSelectedTabColorChange: c,
67
+ selectedTabIndex: o ?? t.length - 1
68
+ }), [
69
+ w,
70
+ t,
71
+ p,
72
+ f,
73
+ c,
74
+ o
75
+ ]), j = (e, { dataIndex: n }) => f?.(n);
76
+ return /* @__PURE__ */ d(N, {
51
77
  sx: {
52
78
  alignItems: "center",
53
79
  width: "100%"
54
80
  },
55
81
  children: [
56
- M && h === "top" && w,
57
- /* @__PURE__ */ o(X, {
58
- ref: A,
82
+ R && u === "top" && B,
83
+ /* @__PURE__ */ i($, {
84
+ ref: v,
59
85
  sx: {
60
- height: x || 122,
61
- mb: h === "top" ? 0 : 4,
62
- mt: h === "top" ? 4 : 0,
86
+ height: g || 122,
87
+ mb: u === "top" ? 0 : 4,
88
+ mt: u === "top" ? 4 : 0,
63
89
  touchAction: "pan-y",
64
90
  width: "100%",
65
91
  "& svg": {
66
92
  touchAction: "pan-y",
67
93
  userSelect: "none"
94
+ },
95
+ ...p && {
96
+ '& [role="button"]': {
97
+ cursor: "pointer",
98
+ outline: "none"
99
+ },
100
+ '& [role="button"]:focus-visible path': {
101
+ stroke: y.palette.primary.main,
102
+ strokeOpacity: 0.8,
103
+ strokeWidth: 3
104
+ }
68
105
  }
69
106
  },
70
- children: /* @__PURE__ */ b($, {
71
- height: R,
107
+ children: /* @__PURE__ */ d(E, {
108
+ height: D,
72
109
  margin: {
73
- bottom: a.bottom,
74
- left: a.left,
75
- right: a.right,
76
- top: a.top || 45
110
+ bottom: h.bottom,
111
+ left: h.left,
112
+ right: h.right,
113
+ top: h.top || 45
77
114
  },
78
- series: C.series,
79
- width: B,
80
- xAxis: C.xAxis,
115
+ series: M.series,
116
+ width: W,
117
+ xAxis: M.xAxis,
81
118
  yAxis: [{ width: 0 }],
82
119
  children: [
83
- c?.average && /* @__PURE__ */ o(S, {
120
+ a?.average && /* @__PURE__ */ i(L, {
84
121
  labelAlign: "middle",
85
122
  lineStyle: {
86
- stroke: k.palette.chart.chart7,
123
+ stroke: y.palette.chart.chart7,
87
124
  strokeDasharray: "4",
88
125
  strokeLinecap: "round",
89
126
  strokeWidth: 1
90
127
  },
91
- y: c?.average
128
+ y: a?.average
92
129
  }),
93
- p && /* @__PURE__ */ o(S, {
130
+ A && /* @__PURE__ */ i(L, {
94
131
  labelAlign: "middle",
95
- lineStyle: { stroke: k.palette.chart.chart7 },
132
+ lineStyle: { stroke: y.palette.chart.chart7 },
96
133
  y: 0
97
134
  }),
98
- /* @__PURE__ */ o(q, {
99
- slots: { axisTickLabel: ({ text: t, ownerState: r, ...i }) => {
100
- const l = e[s ?? e.length - 1]?.label;
101
- return /* @__PURE__ */ o("text", {
102
- ...i,
135
+ /* @__PURE__ */ i(F, {
136
+ slots: { axisTickLabel: ({ text: e, ownerState: n, ...s }) => {
137
+ const m = t[o ?? t.length - 1]?.label;
138
+ return /* @__PURE__ */ i("text", {
139
+ ...s,
103
140
  style: {
104
- ...i.style,
105
- fontWeight: !f && l === t ? "bold" : 400
141
+ ...s.style,
142
+ fontWeight: !c && m === e ? "bold" : 400
106
143
  },
107
- children: t
144
+ children: e
108
145
  });
109
146
  } },
110
- sx: (t) => ({
111
- "& .MuiChartsAxis-line": { stroke: p ? "none" : t.palette.text?.primary },
147
+ sx: (e) => ({
148
+ "& .MuiChartsAxis-line": { stroke: A ? "none" : e.palette.text?.primary },
112
149
  "& .MuiChartsAxis-tickContainer:first-of-type .MuiChartsAxis-tick": { display: "none" },
113
- "& .MuiChartsAxis-tickLabel": { transform: p ? "translateY(15px)" : {} }
150
+ "& .MuiChartsAxis-tickLabel": { transform: A ? "translateY(15px)" : {} }
114
151
  }),
115
152
  tickLabelStyle: { fontSize: 11 }
116
153
  }),
117
- /* @__PURE__ */ o(Y, {
118
- onItemClick: D,
119
- slots: { bar: (t) => {
120
- const { ownerState: r, ...i } = t;
121
- return /* @__PURE__ */ o(W, {
122
- ...i,
123
- colorRange: L,
124
- data: e,
125
- dataIndex: r.dataIndex,
126
- removeSelectedTabColorChange: f,
127
- selectedTabIndex: s ?? e.length - 1,
128
- style: {
129
- height: t.height,
130
- x: t.x,
131
- y: t.y,
132
- width: t.width
133
- }
134
- });
135
- } }
154
+ /* @__PURE__ */ i(S.Provider, {
155
+ value: b,
156
+ children: /* @__PURE__ */ i(q, {
157
+ onItemClick: j,
158
+ slots: { bar: H }
159
+ })
136
160
  })
137
161
  ]
138
162
  })
139
163
  }),
140
- M && h === "bottom" && w
164
+ R && u === "bottom" && B
141
165
  ]
142
166
  });
143
167
  };
144
168
  export {
145
- P as BarChartV2
169
+ et as BarChartV2
146
170
  };
147
171
 
148
172
  //# sourceMappingURL=BarchartV2.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BarchartV2.es.js","names":[],"sources":["../../../../src/insights-v2/components/chartblocks/BarchartV2.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { type Theme, alpha, useTheme } from '@mui/material/styles'\nimport {\n BarPlot,\n type BarSeriesType,\n ChartContainer as ResponsiveChartContainer,\n ChartsReferenceLine,\n ChartsXAxis,\n} from '@mui/x-charts'\n\nimport { useContainerDimensions } from '../../../insights/hooks/useContainerDimensions'\nimport type { BarChartV2Props } from '../../../insights/types/Charts/BarChart'\nimport { LegendV2 } from '../../../insights/components/shared/Charts/BarChart/ChartLegendV2'\nimport { CustomBarPlotV2 } from '../../../insights/components/shared/Charts/BarChart/CustomBarPlotV2'\n\nexport const BarChartV2 = ({\n amounts,\n color,\n data,\n heightOverride,\n margin = {\n bottom: 30,\n left: 16,\n right: 16,\n top: 20,\n },\n onBarClick,\n legendPosition = 'bottom',\n monthlyAmountLabel,\n removeSelectedTabColorChange,\n selectedTabIndex,\n showMonthlyAmount = true,\n trendAmountLabel,\n unselectedOpacity,\n}: BarChartV2Props) => {\n const containerRef = React.useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const theme = useTheme()\n\n const chartData = React.useMemo(() => {\n const values = data.map(({ value }) => value)\n const minValue = Math.min(...values)\n const maxValue = Math.max(...values)\n\n return {\n series: [\n {\n data: values,\n type: 'bar',\n },\n ] as BarSeriesType[],\n xAxis: [\n {\n data: data.map(({ label }) => label),\n scaleType: 'band' as const,\n categoryGapRatio: 0.45,\n },\n ],\n yAxis: [\n {\n scaleType: 'linear' as const,\n min: minValue < 0 ? minValue * 1.2 : 0,\n max: maxValue > 0 ? maxValue : 0,\n },\n ],\n }\n }, [data])\n\n const colorRange = React.useMemo(() => {\n const defaultColor =\n unselectedOpacity === undefined ? `${color}80` : alpha(color, unselectedOpacity)\n if (removeSelectedTabColorChange) return data.map(() => color)\n\n if (selectedTabIndex == null) {\n return [...new Array(data.length - 1).fill(defaultColor), color]\n }\n return data.map((_, index) => (index === selectedTabIndex ? color : defaultColor))\n }, [color, data, selectedTabIndex, unselectedOpacity])\n\n const selectedData = React.useMemo(\n () => data[selectedTabIndex ?? data.length - 1],\n [data, selectedTabIndex],\n )\n\n const lowestValue = data.reduce((min, item) => Math.min(min, item.value), Infinity)\n const isNegative = lowestValue < 0\n\n const legendComponent = (\n <LegendV2\n color={color}\n legendStyle={{ pl: margin.left }}\n monthlyAmount={showMonthlyAmount ? selectedData.formattedAmount : undefined}\n monthlyAmountLabel={monthlyAmountLabel}\n trendAmount={amounts?.formattedAverage}\n trendAmountLabel={trendAmountLabel}\n />\n )\n\n const shouldShowLegend = monthlyAmountLabel || trendAmountLabel\n\n const handleBarClick = (\n _: React.MouseEvent<SVGElement, MouseEvent>,\n { dataIndex }: { dataIndex: number },\n ) => onBarClick?.(dataIndex)\n\n return (\n <Stack sx={{ alignItems: 'center', width: '100%' }}>\n {shouldShowLegend && legendPosition === 'top' && legendComponent}\n <Box\n ref={containerRef}\n sx={{\n height: heightOverride ? heightOverride : 122,\n mb: legendPosition === 'top' ? 0 : 4,\n mt: legendPosition === 'top' ? 4 : 0,\n touchAction: 'pan-y',\n width: '100%',\n '& svg': {\n touchAction: 'pan-y',\n userSelect: 'none',\n },\n }}\n >\n <ResponsiveChartContainer\n height={height}\n margin={{\n bottom: margin.bottom,\n left: margin.left,\n right: margin.right,\n top: margin.top || 45,\n }}\n series={chartData.series}\n width={width}\n xAxis={chartData.xAxis}\n yAxis={[{ width: 0 }]}\n >\n {amounts?.average && (\n <ChartsReferenceLine\n labelAlign=\"middle\"\n lineStyle={{\n stroke: theme.palette.chart.chart7,\n strokeDasharray: '4',\n strokeLinecap: 'round',\n strokeWidth: 1,\n }}\n y={amounts?.average}\n />\n )}\n\n {isNegative && (\n <ChartsReferenceLine\n labelAlign=\"middle\"\n lineStyle={{\n stroke: theme.palette.chart.chart7,\n }}\n y={0}\n />\n )}\n\n <ChartsXAxis\n slots={{\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n axisTickLabel: ({ text, ownerState: _, ...restProps }) => {\n const label = data[selectedTabIndex ?? data.length - 1]?.label\n return (\n <text\n {...restProps}\n style={\n {\n ...restProps.style,\n fontWeight: !removeSelectedTabColorChange && label === text ? 'bold' : 400,\n } as React.CSSProperties\n }\n >\n {text}\n </text>\n )\n },\n }}\n sx={(theme) => ({\n '& .MuiChartsAxis-line': {\n stroke: !isNegative ? (theme as Theme).palette.text?.primary : 'none',\n },\n '& .MuiChartsAxis-tickContainer:first-of-type .MuiChartsAxis-tick': {\n display: 'none',\n },\n '& .MuiChartsAxis-tickLabel': {\n transform: isNegative ? 'translateY(15px)' : {},\n },\n })}\n tickLabelStyle={{\n fontSize: 11,\n }}\n />\n <BarPlot\n onItemClick={handleBarClick}\n slots={{\n bar: (props) => {\n const { ownerState, ...defaultProps } = props\n return (\n <CustomBarPlotV2\n {...defaultProps}\n colorRange={colorRange}\n data={data}\n dataIndex={ownerState.dataIndex}\n removeSelectedTabColorChange={removeSelectedTabColorChange}\n selectedTabIndex={selectedTabIndex ?? data.length - 1}\n style={{\n height: props.height,\n x: props.x,\n y: props.y,\n width: props.width,\n }}\n />\n )\n },\n }}\n />\n </ResponsiveChartContainer>\n </Box>\n {shouldShowLegend && legendPosition === 'bottom' && legendComponent}\n </Stack>\n )\n}\n"],"mappings":";;;;;;;;;AAkBA,IAAa,IAAA,CAAc,EACzB,SAAA,GACA,OAAA,GACA,MAAA,GACA,gBAAA,GACA,QAAA,IAAS;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AACP,GACA,YAA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B,kBAAkB,KAAoB,EAAK,SAAS;AAAA,kBACpD,OAAO;AAAA,oBACL,QAAQ,EAAM;AAAA,oBACd,GAAG,EAAM;AAAA,oBACT,GAAG,EAAM;AAAA,oBACT,OAAO,EAAM;AAAA,kBACf;AAAA,gBACD,CAAA;AAAA,cAEL,EACF;AAAA,YACD,CAAA;AAAA,UACuB;AAAA;MACvB,CAAA;AAAA,MACJ,KAAoB,MAAmB,YAAY;AAAA,IAC/C;AAAA;AAEX"}
1
+ {"version":3,"file":"BarchartV2.es.js","names":[],"sources":["../../../../src/insights-v2/components/chartblocks/BarchartV2.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { type Theme, alpha, useTheme } from '@mui/material/styles'\nimport {\n BarPlot,\n type BarProps,\n type BarSeriesType,\n ChartContainer as ResponsiveChartContainer,\n ChartsReferenceLine,\n ChartsXAxis,\n} from '@mui/x-charts'\n\nimport { useContainerDimensions } from '../../../insights/hooks/useContainerDimensions'\nimport type { BarChartV2Props } from '../../../insights/types/Charts/BarChart'\nimport { LegendV2 } from '../../../insights/components/shared/Charts/BarChart/ChartLegendV2'\nimport {\n CustomBarPlotV2,\n type CustomBarPlotV2Props,\n} from '../../../insights/components/shared/Charts/BarChart/CustomBarPlotV2'\n\ntype BarChartProps = BarChartV2Props & {\n /**\n * Each bar is a focusable button (Enter / Space call `onBarClick`), for a chart that is the only way\n * to pick a bar, e.g. a drawer without month tabs. Absent: bars are mouse-only.\n */\n keyboardSelectable?: boolean\n}\n\n// What each bar needs from its chart, beyond the props x-charts hands the `bar` slot.\ntype ChartBarContextValue = Pick<\n CustomBarPlotV2Props,\n 'colorRange' | 'data' | 'onKeyboardSelect' | 'removeSelectedTabColorChange' | 'selectedTabIndex'\n>\n\nconst ChartBarContext = React.createContext<ChartBarContextValue | null>(null)\n\n/**\n * The `bar` slot. A module-level component (chart state comes through ChartBarContext), so a re-render\n * such as a new selection updates the bars in place instead of re-mounting them, and a keyboard user's\n * focused bar keeps focus.\n */\nconst ChartBar = ({ ownerState, ...barProps }: BarProps) => {\n const chart = React.useContext(ChartBarContext)\n if (!chart) return null\n\n return (\n <CustomBarPlotV2\n {...barProps}\n {...chart}\n dataIndex={ownerState.dataIndex}\n style={{ height: barProps.height, x: barProps.x, y: barProps.y, width: barProps.width }}\n />\n )\n}\n\nexport const BarChartV2 = ({\n amounts,\n color,\n data,\n heightOverride,\n keyboardSelectable = false,\n margin = {\n bottom: 30,\n left: 16,\n right: 16,\n top: 20,\n },\n onBarClick,\n legendPosition = 'bottom',\n monthlyAmountLabel,\n removeSelectedTabColorChange,\n selectedTabIndex,\n showMonthlyAmount = true,\n trendAmountLabel,\n unselectedOpacity,\n}: BarChartProps) => {\n const containerRef = React.useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const theme = useTheme()\n\n const chartData = React.useMemo(() => {\n const values = data.map(({ value }) => value)\n const minValue = Math.min(...values)\n const maxValue = Math.max(...values)\n\n return {\n series: [\n {\n data: values,\n type: 'bar',\n },\n ] as BarSeriesType[],\n xAxis: [\n {\n data: data.map(({ label }) => label),\n scaleType: 'band' as const,\n categoryGapRatio: 0.45,\n },\n ],\n yAxis: [\n {\n scaleType: 'linear' as const,\n min: minValue < 0 ? minValue * 1.2 : 0,\n max: maxValue > 0 ? maxValue : 0,\n },\n ],\n }\n }, [data])\n\n const colorRange = React.useMemo(() => {\n const defaultColor =\n unselectedOpacity === undefined ? `${color}80` : alpha(color, unselectedOpacity)\n if (removeSelectedTabColorChange) return data.map(() => color)\n\n if (selectedTabIndex == null) {\n return [...new Array(data.length - 1).fill(defaultColor), color]\n }\n return data.map((_, index) => (index === selectedTabIndex ? color : defaultColor))\n }, [color, data, selectedTabIndex, unselectedOpacity])\n\n const selectedData = React.useMemo(\n () => data[selectedTabIndex ?? data.length - 1],\n [data, selectedTabIndex],\n )\n\n const lowestValue = data.reduce((min, item) => Math.min(min, item.value), Infinity)\n const isNegative = lowestValue < 0\n\n const legendComponent = (\n <LegendV2\n color={color}\n legendStyle={{ pl: margin.left }}\n monthlyAmount={showMonthlyAmount ? selectedData.formattedAmount : undefined}\n monthlyAmountLabel={monthlyAmountLabel}\n trendAmount={amounts?.formattedAverage}\n trendAmountLabel={trendAmountLabel}\n />\n )\n\n const shouldShowLegend = monthlyAmountLabel || trendAmountLabel\n\n const chartBar = React.useMemo<ChartBarContextValue>(\n () => ({\n colorRange,\n data,\n onKeyboardSelect: keyboardSelectable ? onBarClick : undefined,\n removeSelectedTabColorChange,\n selectedTabIndex: selectedTabIndex ?? data.length - 1,\n }),\n [\n colorRange,\n data,\n keyboardSelectable,\n onBarClick,\n removeSelectedTabColorChange,\n selectedTabIndex,\n ],\n )\n\n const handleBarClick = (\n _: React.MouseEvent<SVGElement, MouseEvent>,\n { dataIndex }: { dataIndex: number },\n ) => onBarClick?.(dataIndex)\n\n return (\n <Stack sx={{ alignItems: 'center', width: '100%' }}>\n {shouldShowLegend && legendPosition === 'top' && legendComponent}\n <Box\n ref={containerRef}\n sx={{\n height: heightOverride ? heightOverride : 122,\n mb: legendPosition === 'top' ? 0 : 4,\n mt: legendPosition === 'top' ? 4 : 0,\n touchAction: 'pan-y',\n width: '100%',\n '& svg': {\n touchAction: 'pan-y',\n userSelect: 'none',\n },\n // Keyboard bars draw their focus as a ring on the bar, as the Donut's segments do.\n ...(keyboardSelectable && {\n '& [role=\"button\"]': { cursor: 'pointer', outline: 'none' },\n '& [role=\"button\"]:focus-visible path': {\n stroke: theme.palette.primary.main,\n strokeOpacity: 0.8,\n strokeWidth: 3,\n },\n }),\n }}\n >\n <ResponsiveChartContainer\n height={height}\n margin={{\n bottom: margin.bottom,\n left: margin.left,\n right: margin.right,\n top: margin.top || 45,\n }}\n series={chartData.series}\n width={width}\n xAxis={chartData.xAxis}\n yAxis={[{ width: 0 }]}\n >\n {amounts?.average && (\n <ChartsReferenceLine\n labelAlign=\"middle\"\n lineStyle={{\n stroke: theme.palette.chart.chart7,\n strokeDasharray: '4',\n strokeLinecap: 'round',\n strokeWidth: 1,\n }}\n y={amounts?.average}\n />\n )}\n\n {isNegative && (\n <ChartsReferenceLine\n labelAlign=\"middle\"\n lineStyle={{\n stroke: theme.palette.chart.chart7,\n }}\n y={0}\n />\n )}\n\n <ChartsXAxis\n slots={{\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n axisTickLabel: ({ text, ownerState: _, ...restProps }) => {\n const label = data[selectedTabIndex ?? data.length - 1]?.label\n return (\n <text\n {...restProps}\n style={\n {\n ...restProps.style,\n fontWeight: !removeSelectedTabColorChange && label === text ? 'bold' : 400,\n } as React.CSSProperties\n }\n >\n {text}\n </text>\n )\n },\n }}\n sx={(theme) => ({\n '& .MuiChartsAxis-line': {\n stroke: !isNegative ? (theme as Theme).palette.text?.primary : 'none',\n },\n '& .MuiChartsAxis-tickContainer:first-of-type .MuiChartsAxis-tick': {\n display: 'none',\n },\n '& .MuiChartsAxis-tickLabel': {\n transform: isNegative ? 'translateY(15px)' : {},\n },\n })}\n tickLabelStyle={{\n fontSize: 11,\n }}\n />\n <ChartBarContext.Provider value={chartBar}>\n <BarPlot onItemClick={handleBarClick} slots={{ bar: ChartBar }} />\n </ChartBarContext.Provider>\n </ResponsiveChartContainer>\n </Box>\n {shouldShowLegend && legendPosition === 'bottom' && legendComponent}\n </Stack>\n )\n}\n"],"mappings":";;;;;;;;;AAoCA,IAAM,IAAkB,EAAM,cAA2C,IAAI,GAOvE,IAAA,CAAY,EAAE,YAAA,GAAY,GAAG,EAAA,MAAyB;AAC1D,QAAM,IAAQ,EAAM,WAAW,CAAe;AAC9C,SAAK,IAGH,gBAAA,EAAC,GAAD;AAAA,IACE,GAAI;AAAA,IACJ,GAAI;AAAA,IACJ,WAAW,EAAW;AAAA,IACtB,OAAO;AAAA,MAAE,QAAQ,EAAS;AAAA,MAAQ,GAAG,EAAS;AAAA,MAAG,GAAG,EAAS;AAAA,MAAG,OAAO,EAAS;AAAA,IAAM;AAAA,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,GAAG,EAAU;AAAA,oBACb,YAAY,CAAC,KAAgC,MAAU,IAAO,SAAS;AAAA,kBACzE;AAAA,kBAGD,UAAA;AAAA,gBACG,CAAA;AAAA,cAEV,EACF;AAAA,cACA,IAAA,CAAK,OAAW;AAAA,gBACd,yBAAyB,EACvB,QAAS,IAAsD,SAAxC,EAAgB,QAAQ,MAAM,QACvD;AAAA,gBACA,oEAAoE,EAClE,SAAS,OACX;AAAA,gBACA,8BAA8B,EAC5B,WAAW,IAAa,qBAAqB,CAAC,EAChD;AAAA,cACF;AAAA,cACA,gBAAgB,EACd,UAAU,GACZ;AAAA,YACD,CAAA;AAAA,YACD,gBAAA,EAAC,EAAgB,UAAjB;AAAA,cAA0B,OAAO;AAAA,cAC/B,UAAA,gBAAA,EAAC,GAAD;AAAA,gBAAS,aAAa;AAAA,gBAAgB,OAAO,EAAE,KAAK,EAAS;AAAA,cAAI,CAAA;AAAA,YACzC,CAAA;AAAA,UACF;AAAA;MACvB,CAAA;AAAA,MACJ,KAAoB,MAAmB,YAAY;AAAA,IAC/C;AAAA;AAEX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.196",
3
+ "version": "9.7.197",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",