@mx-cartographer/experiences 9.4.8 → 9.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [9.4.9] - 09-01-2026
2
+
3
+ - **ADDED** - New theming properties on `ClientStyleProfile` and `StyleConfig`, and a `getClientCustomizations` util mapping them to MXUI `Customizations` (MEW-3445)
4
+ - **CHANGED** - `secondary_color` now seeds MUI `secondary` and `neutral_color` seeds `grey`/`neutral` (previously `neutral_color` -> `secondary`) (MEW-3445)
5
+ - **ADDED** - `getClientComponentOverrides` util for the overrides MXUI `Customizations` can't express (button/card radius, tab and calendar tints) (MEW-3445)
6
+ - **DEPRECATED** - `getClientPaletteOptions` and `getClientTheme` in favor of `getClientCustomizations` + `getClientComponentOverrides`; both inherit the `secondary_color`/`neutral_color` seed correction above (MEW-3445)
7
+ - **FIXED** - `MiniWidgetContentCoverage` test failed in the last days of a month; its fixture date is now clamped to the end of the current month (MEW-3445)
8
+
1
9
  ## [9.4.8] - 08-27-2026
2
10
 
3
11
  - **ADDED** - insights-v2 Action Block drilldowns: shared `ActionBlockLayer` owns a single drawer, content-only blocks register in `mappings/blocks.ts` keyed by the beat CTA's `block` (WEC-1705)
@@ -3,10 +3,10 @@ import m, { CalendarSelectionTypes as i } from "./components/calendar/Calendar.e
3
3
  import a from "./components/charts/StatusBar.es.js";
4
4
  import p from "./components/charts/Donut.es.js";
5
5
  import u from "./hooks/useAccountDisplayName.es.js";
6
- import { useCombineEvents as S, useCombinePageviews as C } from "./hooks/useCombineEvents.es.js";
6
+ import { useCombineEvents as C, useCombinePageviews as S } from "./hooks/useCombineEvents.es.js";
7
7
  import { GlobalDataContext as c, GlobalDataProvider as T } from "./context/GlobalDataProvider.es.js";
8
8
  import { WidgetContainerContext as E, WidgetContainerProvider as D } from "./context/WidgetContainerProvider.es.js";
9
- import { useAccountStore as _, useAppConfig as N, useBudgetsStore as y, useCashflowStore as A, useCategoryStore as P, useDebtStore as b, useError as O, useEvent as G, useFinstrongStore as W, useGlobalCopyStore as L, useGlobalStore as R, useGlobalUiStore as U, useGoalStore as v, useHelpStore as B, useHoldingStore as h, useInsightsV2Store as w, useLoad as x, useMerchantStore as M, useNetWorthStore as Y, useNotificationStore as H, usePageView as F, useRecurringTransactionsStore as V, useSettingsStore as z, useTransactionStore as k, useTrendsStore as q, useUserStore as K, useWidgetContainerProvider as Z } from "./context/hooks.es.js";
9
+ import { useAccountStore as _, useAppConfig as N, useBudgetsStore as y, useCashflowStore as A, useCategoryStore as P, useDebtStore as b, useError as O, useEvent as G, useFinstrongStore as W, useGlobalCopyStore as L, useGlobalStore as R, useGlobalUiStore as U, useGoalStore as v, useHelpStore as B, useHoldingStore as h, useInsightsV2Store as w, useLoad as x, useMerchantStore as M, useNetWorthStore as Y, useNotificationStore as H, usePageView as F, useRecurringTransactionsStore as z, useSettingsStore as V, useTransactionStore as k, useTrendsStore as q, useUserStore as K, useWidgetContainerProvider as Z } from "./context/hooks.es.js";
10
10
  import { useInsightsEnabled as J } from "./hooks/useInsightsEnabled.es.js";
11
11
  import { useScreenSize as X } from "./hooks/useScreenSize.es.js";
12
12
  import oo from "./hooks/usePrevious.es.js";
@@ -16,7 +16,7 @@ import no from "./components/dialog/Dialog.es.js";
16
16
  import so from "./components/drawer/Drawer.es.js";
17
17
  import fo from "./components/daterangeselector/DateRangeSelector.es.js";
18
18
  import { ANALYTICS_EVENTS as lo } from "./constants/Analytics.es.js";
19
- import { CONNECTIONS_WIDGET_ID as Co, CONNECT_WIDGET_ID as go, MemberConnectionStatus as co } from "./constants/Connect.es.js";
19
+ import { CONNECTIONS_WIDGET_ID as So, CONNECT_WIDGET_ID as go, MemberConnectionStatus as co } from "./constants/Connect.es.js";
20
20
  import { formatCurrency as Eo, formatOrdinal as Do, formatPercentage as Io, generateEqualIntervals as _o, getCurrencyCodes as No, getPluralRules as yo } from "../core/utils/NumberFormatting.es.js";
21
21
  import { GlobalStore as Po } from "../core/stores/GlobalStore.es.js";
22
22
  import { INCOME_ACCOUNT_TYPES as Oo, PAYMENT_ACCOUNT_TYPES as Go, SPENDING_ACCOUNT_TYPES as Wo } from "./constants/Account.es.js";
@@ -25,7 +25,7 @@ import { LOADING_STATUS as vo } from "./constants/SpendingPlan.es.js";
25
25
  import { DEFAULT_DONUT_SIZE as ho, DEFAULT_STROKE_WIDTH as wo } from "./constants/Donut.es.js";
26
26
  import { Sizes as Mo, TOUCH_TARGET as Yo } from "./constants/Sizes.es.js";
27
27
  import Fo from "./components/donuts/MultiSegmentDonut.es.js";
28
- import zo from "./components/donuts/SingleSegmentDonut.es.js";
28
+ import Vo from "./components/donuts/SingleSegmentDonut.es.js";
29
29
  import qo from "./components/ErrorBoundary.es.js";
30
30
  import Zo from "./components/Error.es.js";
31
31
  import Jo from "./components/MicroWidgetContainer.es.js";
@@ -37,7 +37,7 @@ import nr from "./components/ConnectDrawer.es.js";
37
37
  import sr from "./components/CurrencyDialog.es.js";
38
38
  import fr from "./components/CurrencyInput.es.js";
39
39
  import lr from "./components/ResponsiveButton.es.js";
40
- import Cr from "./components/SearchBox.es.js";
40
+ import Sr from "./components/SearchBox.es.js";
41
41
  import cr from "./components/SelectionBox.es.js";
42
42
  import dr from "./components/TabContentContainer.es.js";
43
43
  import Dr from "./components/IconBacking.es.js";
@@ -52,11 +52,11 @@ import { ListItemWrapper as hr } from "./components/ListItemWrapper.es.js";
52
52
  import { Select as xr } from "./components/Select.es.js";
53
53
  import { ToggleButtonListItem as Yr } from "./components/listitems/ToggleButtonListItem.es.js";
54
54
  import { ToggleListItem as Fr } from "./components/listitems/ToggleListItem.es.js";
55
- import { analyticsSession as zr } from "./utils/Analytics.es.js";
56
- import { getClientPaletteOptions as qr, getClientTheme as Kr } from "./utils/Theme.es.js";
55
+ import { analyticsSession as Vr } from "./utils/Analytics.es.js";
56
+ import { getClientComponentOverrides as qr, getClientCustomizations as Kr, getClientPaletteOptions as Zr, getClientTheme as jr } from "./utils/Theme.es.js";
57
57
  export {
58
58
  lo as ANALYTICS_EVENTS,
59
- Co as CONNECTIONS_WIDGET_ID,
59
+ So as CONNECTIONS_WIDGET_ID,
60
60
  go as CONNECT_WIDGET_ID,
61
61
  m as Calendar,
62
62
  i as CalendarSelectionTypes,
@@ -95,10 +95,10 @@ export {
95
95
  Ro as RECURRENCE_COPY,
96
96
  lr as ResponsiveButton,
97
97
  Wo as SPENDING_ACCOUNT_TYPES,
98
- Cr as SearchBox,
98
+ Sr as SearchBox,
99
99
  xr as Select,
100
100
  cr as SelectionBox,
101
- zo as SingleSegmentDonut,
101
+ Vo as SingleSegmentDonut,
102
102
  Mo as Sizes,
103
103
  a as StatusBar,
104
104
  Yo as TOUCH_TARGET,
@@ -108,15 +108,17 @@ export {
108
108
  mr as WidgetContainer,
109
109
  E as WidgetContainerContext,
110
110
  D as WidgetContainerProvider,
111
- zr as analyticsSession,
111
+ Vr as analyticsSession,
112
112
  r as buildDynamicCopy,
113
113
  t as buildPluralCopy,
114
114
  Eo as formatCurrency,
115
115
  Do as formatOrdinal,
116
116
  Io as formatPercentage,
117
117
  _o as generateEqualIntervals,
118
- qr as getClientPaletteOptions,
119
- Kr as getClientTheme,
118
+ qr as getClientComponentOverrides,
119
+ Kr as getClientCustomizations,
120
+ Zr as getClientPaletteOptions,
121
+ jr as getClientTheme,
120
122
  No as getCurrencyCodes,
121
123
  yo as getPluralRules,
122
124
  u as useAccountDisplayName,
@@ -125,8 +127,8 @@ export {
125
127
  y as useBudgetsStore,
126
128
  A as useCashflowStore,
127
129
  P as useCategoryStore,
128
- S as useCombineEvents,
129
- C as useCombinePageviews,
130
+ C as useCombineEvents,
131
+ S as useCombinePageviews,
130
132
  b as useDebtStore,
131
133
  O as useError,
132
134
  G as useEvent,
@@ -145,9 +147,9 @@ export {
145
147
  H as useNotificationStore,
146
148
  F as usePageView,
147
149
  oo as usePrevious,
148
- V as useRecurringTransactionsStore,
150
+ z as useRecurringTransactionsStore,
149
151
  X as useScreenSize,
150
- z as useSettingsStore,
152
+ V as useSettingsStore,
151
153
  k as useTransactionStore,
152
154
  q as useTrendsStore,
153
155
  K as useUserStore,
@@ -1,7 +1,71 @@
1
1
  import { PaletteColor, PaletteMode, Theme } from '@mui/material';
2
+ import { Customizations } from '@mxenabled/mxui';
2
3
  import { ClientStyleProfile } from '../../core';
3
- import { ClientConfig } from '../../core/types/AppData';
4
+ import { ClientConfig, StyleConfig } from '../../core/types/AppData';
5
+ export declare const getClientCustomizations: (clientStyleProfile: ClientStyleProfile, mode: PaletteMode, styleConfig?: StyleConfig) => Customizations;
6
+ export declare const getClientComponentOverrides: (theme: Theme, clientStyleProfile: ClientStyleProfile, clientConfig?: ClientConfig) => {
7
+ components: {
8
+ MuiCard?: {
9
+ styleOverrides: {
10
+ root: {
11
+ borderRadius: string;
12
+ };
13
+ };
14
+ } | undefined;
15
+ MuiPaper?: {
16
+ styleOverrides: {
17
+ rounded: {
18
+ borderRadius: string;
19
+ };
20
+ };
21
+ } | undefined;
22
+ MuiButton?: {
23
+ styleOverrides: {
24
+ root: {
25
+ borderRadius: string;
26
+ textTransform: string;
27
+ };
28
+ };
29
+ } | undefined;
30
+ MuiIconButton?: {
31
+ styleOverrides: {
32
+ root: {
33
+ borderRadius: string;
34
+ minWidth: number;
35
+ minHeight: number;
36
+ };
37
+ };
38
+ } | undefined;
39
+ MuiToggleButton?: {
40
+ styleOverrides: {
41
+ root: {
42
+ borderRadius: string;
43
+ textTransform: string;
44
+ };
45
+ };
46
+ } | undefined;
47
+ MuiTabs: {
48
+ styleOverrides: {
49
+ indicator: {
50
+ backgroundColor: string;
51
+ };
52
+ };
53
+ };
54
+ MuiPickersCalendarHeader: {
55
+ styleOverrides: {
56
+ switchViewButton: {
57
+ color: string | undefined;
58
+ '&:hover': {
59
+ backgroundColor: string;
60
+ };
61
+ };
62
+ };
63
+ };
64
+ };
65
+ };
66
+ /** @deprecated Use `getClientCustomizations` and pass the result to `createMXTheme` */
4
67
  export declare const getClientPaletteOptions: (clientStyleProfile: ClientStyleProfile, mode: PaletteMode) => Record<string, string>;
68
+ /** @deprecated Build the theme with `getClientCustomizations` + `createMXTheme` and merge `getClientComponentOverrides` on top */
5
69
  export declare const getClientTheme: (theme: Theme, clientStyleProfile: ClientStyleProfile, clientConfig?: ClientConfig) => {
6
70
  typography: {
7
71
  [k: string]: string | {
@@ -1,5 +1,5 @@
1
- import { alpha as _, darken as y, lighten as k } from "@mui/material";
2
- var h = [
1
+ import { alpha as y, darken as m, lighten as g } from "@mui/material";
2
+ var R = [
3
3
  "fontFamily",
4
4
  "h1",
5
5
  "h2",
@@ -11,86 +11,150 @@ var h = [
11
11
  "subtitle1",
12
12
  "subtitle2",
13
13
  "tiny"
14
- ], p = [
14
+ ], b = [
15
15
  {
16
16
  key: "primary",
17
+ override: "primary_color",
17
18
  light: "primary_color",
18
19
  dark: "primary_color_dark"
19
20
  },
20
21
  {
21
22
  key: "secondary",
22
- light: "neutral_color",
23
- dark: "neutral_color_dark"
23
+ override: "secondary_color",
24
+ light: "secondary_color",
25
+ dark: "secondary_color_dark"
24
26
  },
25
27
  {
26
28
  key: "error",
29
+ override: "error_color",
27
30
  light: "error_color",
28
31
  dark: "error_color_dark"
29
32
  },
30
33
  {
31
34
  key: "warning",
35
+ override: "warning_color",
32
36
  light: "warning_color",
33
37
  dark: "warning_color_dark"
34
38
  },
35
39
  {
36
40
  key: "info",
41
+ override: "info_color",
37
42
  light: "info_color",
38
43
  dark: "info_color_dark"
39
44
  },
40
45
  {
41
46
  key: "success",
47
+ override: "success_color",
42
48
  light: "success_color",
43
49
  dark: "success_color_dark"
44
50
  }
45
- ], f = (a, o) => {
46
- const l = o === "dark", i = {};
47
- for (const { key: n, light: c, dark: t } of p) {
48
- const s = a?.[l ? t : c];
49
- s && (i[n] = s);
51
+ ], h = [...b, {
52
+ key: "grey",
53
+ override: "neutral_color",
54
+ light: "neutral_color",
55
+ dark: "neutral_color_dark"
56
+ }], C = (r, s, t) => {
57
+ const i = s === "dark", n = {};
58
+ for (const { key: u, override: l, light: v, dark: O } of h) {
59
+ const k = t?.[l] ?? r?.[i ? O : v];
60
+ k && (n[u] = k);
61
+ }
62
+ const a = (u) => i ? { dark: u } : { light: u }, e = t?.background_color ?? r?.background_color, c = t?.paper_color ?? r?.paper_color;
63
+ (e || c) && (n.background = {
64
+ ...e && { default: a(e) },
65
+ ...c && { paper: a(c) }
66
+ });
67
+ const _ = t?.font_name || r?.body_font_name || r?.system_font, d = t?.header_font_name || r?.header_font_name, p = t?.use_glass ?? r?.use_glass, o = t?.corner_radius ?? r?.card_corner_radius;
68
+ return {
69
+ ...Object.keys(n).length > 0 && { paletteOptions: n },
70
+ ...(_ || d) && { typographyOptions: {
71
+ ..._ && { fontFamily: _ },
72
+ ...d && { headerFontFamily: d }
73
+ } },
74
+ ...p !== void 0 && { styleOptions: { useGlass: p } },
75
+ ...o !== void 0 && { shapeOptions: { borderRadius: o } }
76
+ };
77
+ }, x = (r, s, t) => {
78
+ const i = t?.master?.style, n = {
79
+ MuiTabs: { styleOverrides: { indicator: { backgroundColor: r.palette.primary.light } } },
80
+ MuiPickersCalendarHeader: { styleOverrides: { switchViewButton: {
81
+ color: r.palette.primary.lighter,
82
+ "&:hover": { backgroundColor: y(r.palette.primary.light, 0.1) }
83
+ } } }
84
+ }, a = s?.button_corner_radius, e = i?.corner_radius ?? s?.card_corner_radius;
85
+ return { components: {
86
+ ...n,
87
+ ...a !== void 0 && {
88
+ MuiButton: { styleOverrides: { root: {
89
+ borderRadius: `${a}px`,
90
+ textTransform: "none"
91
+ } } },
92
+ MuiIconButton: { styleOverrides: { root: {
93
+ borderRadius: `${a}px`,
94
+ minWidth: a,
95
+ minHeight: a
96
+ } } },
97
+ MuiToggleButton: { styleOverrides: { root: {
98
+ borderRadius: `${a}px`,
99
+ textTransform: "none"
100
+ } } }
101
+ },
102
+ ...e !== void 0 && {
103
+ MuiCard: { styleOverrides: { root: { borderRadius: `${e}px` } } },
104
+ MuiPaper: { styleOverrides: { rounded: { borderRadius: `${e}px` } } }
105
+ }
106
+ } };
107
+ }, M = (r, s) => {
108
+ const t = s === "dark", i = {};
109
+ for (const { key: n, light: a, dark: e } of h) {
110
+ const c = r?.[t ? e : a];
111
+ c && (i[n] = c);
50
112
  }
51
113
  return i;
52
- }, O = (a, o, l) => {
53
- const i = a.palette.mode === "dark", n = (l?.master?.style?.font_name || o?.system_font) ?? a.typography.fontFamily, c = (r, u) => r ? {
54
- lighter: k(r, 0.5),
55
- light: k(r, 0.25),
56
- main: r,
57
- dark: y(r, 0.25),
58
- darker: y(r, 0.5)
59
- } : u, t = Object.fromEntries(p.map(({ key: r, light: u, dark: m }) => [r, c(o?.[i ? m : u], a.palette[r])])), s = Object.fromEntries(h.map((r) => [r, r === "fontFamily" ? n : { fontFamily: n }])), g = {
60
- MuiTabs: { styleOverrides: { indicator: { backgroundColor: t.primary.light } } },
114
+ }, T = (r, s, t) => {
115
+ const i = r.palette.mode === "dark", n = (t?.master?.style?.font_name || s?.body_font_name || s?.system_font) ?? r.typography.fontFamily, a = (o, u) => o ? {
116
+ lighter: g(o, 0.5),
117
+ light: g(o, 0.25),
118
+ main: o,
119
+ dark: m(o, 0.25),
120
+ darker: m(o, 0.5)
121
+ } : u, e = Object.fromEntries(b.map(({ key: o, light: u, dark: l }) => [o, a(s?.[i ? l : u], r.palette[o])])), c = Object.fromEntries(R.map((o) => [o, o === "fontFamily" ? n : { fontFamily: n }])), _ = {
122
+ MuiTabs: { styleOverrides: { indicator: { backgroundColor: e.primary.light } } },
61
123
  MuiPickersCalendarHeader: { styleOverrides: { switchViewButton: {
62
- color: t.primary.lighter,
63
- "&:hover": { backgroundColor: _(t.primary.light, 0.1) }
124
+ color: e.primary.lighter,
125
+ "&:hover": { backgroundColor: y(e.primary.light, 0.1) }
64
126
  } } }
65
- }, e = o?.button_corner_radius, d = o?.card_corner_radius;
127
+ }, d = s?.button_corner_radius, p = s?.card_corner_radius;
66
128
  return {
67
- typography: s,
68
- palette: t,
129
+ typography: c,
130
+ palette: e,
69
131
  components: {
70
- ...g,
71
- ...e && {
132
+ ..._,
133
+ ...d && {
72
134
  MuiButton: { styleOverrides: { root: {
73
- borderRadius: `${e}px`,
135
+ borderRadius: `${d}px`,
74
136
  textTransform: "none"
75
137
  } } },
76
138
  MuiIconButton: { styleOverrides: { root: {
77
- borderRadius: `${e}px`,
78
- minWidth: e,
79
- minHeight: e
139
+ borderRadius: `${d}px`,
140
+ minWidth: d,
141
+ minHeight: d
80
142
  } } },
81
143
  MuiToggleButton: { styleOverrides: { root: {
82
- borderRadius: `${e}px`,
144
+ borderRadius: `${d}px`,
83
145
  textTransform: "none"
84
146
  } } }
85
147
  },
86
- ...d && { MuiCard: { styleOverrides: { root: { borderRadius: `${d}px` } } } },
87
- ...d && { MuiPaper: { styleOverrides: { rounded: { borderRadius: `${d}px` } } } }
148
+ ...p && { MuiCard: { styleOverrides: { root: { borderRadius: `${p}px` } } } },
149
+ ...p && { MuiPaper: { styleOverrides: { rounded: { borderRadius: `${p}px` } } } }
88
150
  }
89
151
  };
90
152
  };
91
153
  export {
92
- f as getClientPaletteOptions,
93
- O as getClientTheme
154
+ x as getClientComponentOverrides,
155
+ C as getClientCustomizations,
156
+ M as getClientPaletteOptions,
157
+ T as getClientTheme
94
158
  };
95
159
 
96
160
  //# sourceMappingURL=Theme.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Theme.es.js","names":[],"sources":["../../../src/common/utils/Theme.ts"],"sourcesContent":["import { alpha, darken, lighten, PaletteColor, PaletteMode, Theme } from '@mui/material'\n\nimport type { ClientStyleProfile } from '../../core'\nimport { ClientConfig } from '../../core/types/AppData'\n\nconst TYPOGRAPHY_VARIANTS = [\n 'fontFamily',\n 'h1',\n 'h2',\n 'h3',\n 'body1',\n 'body2',\n 'button',\n 'caption',\n 'subtitle1',\n 'subtitle2',\n 'tiny',\n] as const\n\nconst PALETTE_CONFIG = [\n { key: 'primary', light: 'primary_color', dark: 'primary_color_dark' },\n { key: 'secondary', light: 'neutral_color', dark: 'neutral_color_dark' },\n { key: 'error', light: 'error_color', dark: 'error_color_dark' },\n { key: 'warning', light: 'warning_color', dark: 'warning_color_dark' },\n { key: 'info', light: 'info_color', dark: 'info_color_dark' },\n { key: 'success', light: 'success_color', dark: 'success_color_dark' },\n] as const\n\nexport const getClientPaletteOptions = (\n clientStyleProfile: ClientStyleProfile,\n mode: PaletteMode,\n): Record<string, string> => {\n const isDark = mode === 'dark'\n const options: Record<string, string> = {}\n\n for (const { key, light, dark } of PALETTE_CONFIG) {\n const color = clientStyleProfile?.[isDark ? dark : light] as string | undefined\n if (color) options[key] = color\n }\n\n return options\n}\n\nexport const getClientTheme = (\n theme: Theme,\n clientStyleProfile: ClientStyleProfile,\n clientConfig?: ClientConfig,\n) => {\n const isDark = theme.palette.mode === 'dark'\n const font =\n (clientConfig?.master?.style?.font_name || clientStyleProfile?.system_font) ??\n theme.typography.fontFamily\n\n const generatePalette = (color: string | undefined, defaultColor: PaletteColor) =>\n color\n ? {\n lighter: lighten(color, 0.5),\n light: lighten(color, 0.25),\n main: color,\n dark: darken(color, 0.25),\n darker: darken(color, 0.5),\n }\n : defaultColor\n\n const palette = Object.fromEntries(\n PALETTE_CONFIG.map(({ key, light, dark }) => [\n key,\n generatePalette(\n clientStyleProfile?.[isDark ? dark : light] as string | undefined,\n theme.palette[key],\n ),\n ]),\n )\n\n const typography = Object.fromEntries(\n TYPOGRAPHY_VARIANTS.map((variant) => [\n variant,\n variant === 'fontFamily' ? font : { fontFamily: font },\n ]),\n )\n\n const baseComponents = {\n MuiTabs: {\n styleOverrides: {\n indicator: { backgroundColor: palette.primary.light },\n },\n },\n MuiPickersCalendarHeader: {\n styleOverrides: {\n switchViewButton: {\n color: palette.primary.lighter,\n '&:hover': { backgroundColor: alpha(palette.primary.light, 0.1) },\n },\n },\n },\n }\n\n const buttonRadius = clientStyleProfile?.button_corner_radius\n const cardRadius = clientStyleProfile?.card_corner_radius\n\n const components = {\n ...baseComponents,\n ...(buttonRadius && {\n MuiButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n borderRadius: `${buttonRadius}px`,\n minWidth: buttonRadius,\n minHeight: buttonRadius,\n },\n },\n },\n MuiToggleButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n }),\n ...(cardRadius && {\n MuiCard: {\n styleOverrides: { root: { borderRadius: `${cardRadius}px` } },\n },\n }),\n ...(cardRadius && {\n MuiPaper: {\n styleOverrides: {\n rounded: { borderRadius: `${cardRadius}px` },\n },\n },\n }),\n }\n\n return { typography, palette, components }\n}\n"],"mappings":";AAKA,IAAM,IAAsB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEM,IAAiB;AAAA,EACrB;AAAA,IAAE,KAAK;AAAA,IAAW,OAAO;AAAA,IAAiB,MAAM;AAAA,EAAqB;AAAA,EACrE;AAAA,IAAE,KAAK;AAAA,IAAa,OAAO;AAAA,IAAiB,MAAM;AAAA,EAAqB;AAAA,EACvE;AAAA,IAAE,KAAK;AAAA,IAAS,OAAO;AAAA,IAAe,MAAM;AAAA,EAAmB;AAAA,EAC/D;AAAA,IAAE,KAAK;AAAA,IAAW,OAAO;AAAA,IAAiB,MAAM;AAAA,EAAqB;AAAA,EACrE;AAAA,IAAE,KAAK;AAAA,IAAQ,OAAO;AAAA,IAAc,MAAM;AAAA,EAAkB;AAAA,EAC5D;AAAA,IAAE,KAAK;AAAA,IAAW,OAAO;AAAA,IAAiB,MAAM;AAAA,EAAqB;AACvE,GAEa,IAAA,CACX,GACA,MAC2B;AAC3B,QAAM,IAAS,MAAS,QAClB,IAAkC,CAAC;AAEzC,aAAW,EAAE,KAAA,GAAK,OAAA,GAAO,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AW,EACT,gBAAgB,EACd,MAAM;AAAA,UAAE,cAAc,GAAG,CAAA;AAAA,UAAkB,eAAe;AAAA,QAAO,EACnE,EACF;AAAA,QACA,eAAe,EACb,gBAAgB,EACd,MAAM;AAAA,UACJ,cAAc,GAAG,CAAA;AAAA,UACjB,UAAU;AAAA,UACV,WAAW;AAAA,QACb,EACF,EACF;AAAA,QACA,iBAAiB,EACf,gBAAgB,EACd,MAAM;AAAA,UAAE,cAAc,GAAG,CAAA;AAAA,UAAkB,eAAe;AAAA,QAAO,EACnE,EACF;AAAA,MACF;AAAA,MACA,GAAI,KAAc,EAChB,SAAS,EACP,gBAAgB,EAAE,MAAM,EAAE,cAAc,GAAG,CAAA,KAAe,EAAE,EAC9D,EACF;AAAA,MACA,GAAI,KAAc,EAChB,UAAU,EACR,gBAAgB,EACd,SAAS,EAAE,cAAc,GAAG,CAAA,KAAe,EAC7C,EACF,EACF;AAAA,IAG4B;AAAA,EAAW;AAC3C"}
1
+ {"version":3,"file":"Theme.es.js","names":[],"sources":["../../../src/common/utils/Theme.ts"],"sourcesContent":["import { alpha, darken, lighten, PaletteColor, PaletteMode, Theme } from '@mui/material'\nimport type { Customizations } from '@mxenabled/mxui'\n\nimport type { ClientStyleProfile } from '../../core'\nimport { ClientConfig, StyleConfig } from '../../core/types/AppData'\n\ntype PaletteOptions = NonNullable<Customizations['paletteOptions']>\ntype ModeColorOptions = Partial<NonNullable<NonNullable<PaletteOptions['background']>['default']>>\n\nconst TYPOGRAPHY_VARIANTS = [\n 'fontFamily',\n 'h1',\n 'h2',\n 'h3',\n 'body1',\n 'body2',\n 'button',\n 'caption',\n 'subtitle1',\n 'subtitle2',\n 'tiny',\n] as const\n\nconst PALETTE_CONFIG = [\n { key: 'primary', override: 'primary_color', light: 'primary_color', dark: 'primary_color_dark' },\n {\n key: 'secondary',\n override: 'secondary_color',\n light: 'secondary_color',\n dark: 'secondary_color_dark',\n },\n { key: 'error', override: 'error_color', light: 'error_color', dark: 'error_color_dark' },\n { key: 'warning', override: 'warning_color', light: 'warning_color', dark: 'warning_color_dark' },\n { key: 'info', override: 'info_color', light: 'info_color', dark: 'info_color_dark' },\n { key: 'success', override: 'success_color', light: 'success_color', dark: 'success_color_dark' },\n] as const\n\nconst SEED_CONFIG = [\n ...PALETTE_CONFIG,\n { key: 'grey', override: 'neutral_color', light: 'neutral_color', dark: 'neutral_color_dark' },\n] as const\n\nexport const getClientCustomizations = (\n clientStyleProfile: ClientStyleProfile,\n mode: PaletteMode,\n styleConfig?: StyleConfig,\n): Customizations => {\n const isDark = mode === 'dark'\n\n const paletteOptions: PaletteOptions = {}\n for (const { key, override, light, dark } of SEED_CONFIG) {\n const color = styleConfig?.[override] ?? clientStyleProfile?.[isDark ? dark : light]\n if (color) paletteOptions[key] = color\n }\n\n const asModeColor = (color: string): ModeColorOptions =>\n isDark ? { dark: color } : { light: color }\n const backgroundColor = styleConfig?.background_color ?? clientStyleProfile?.background_color\n const paperColor = styleConfig?.paper_color ?? clientStyleProfile?.paper_color\n if (backgroundColor || paperColor) {\n paletteOptions.background = {\n ...(backgroundColor && { default: asModeColor(backgroundColor) }),\n ...(paperColor && { paper: asModeColor(paperColor) }),\n } as PaletteOptions['background']\n }\n\n const fontFamily =\n styleConfig?.font_name || clientStyleProfile?.body_font_name || clientStyleProfile?.system_font\n const headerFontFamily = styleConfig?.header_font_name || clientStyleProfile?.header_font_name\n\n const useGlass = styleConfig?.use_glass ?? clientStyleProfile?.use_glass\n const borderRadius = styleConfig?.corner_radius ?? clientStyleProfile?.card_corner_radius\n\n return {\n ...(Object.keys(paletteOptions).length > 0 && { paletteOptions }),\n ...((fontFamily || headerFontFamily) && {\n typographyOptions: {\n ...(fontFamily && { fontFamily }),\n ...(headerFontFamily && { headerFontFamily }),\n },\n }),\n ...(useGlass !== undefined && { styleOptions: { useGlass } }),\n ...(borderRadius !== undefined && { shapeOptions: { borderRadius } }),\n }\n}\n\nexport const getClientComponentOverrides = (\n theme: Theme,\n clientStyleProfile: ClientStyleProfile,\n clientConfig?: ClientConfig,\n) => {\n const styleConfig = clientConfig?.master?.style\n\n const baseComponents = {\n MuiTabs: {\n styleOverrides: {\n indicator: { backgroundColor: theme.palette.primary.light },\n },\n },\n MuiPickersCalendarHeader: {\n styleOverrides: {\n switchViewButton: {\n color: theme.palette.primary.lighter,\n '&:hover': { backgroundColor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n },\n }\n\n const buttonRadius = clientStyleProfile?.button_corner_radius\n const cardRadius = styleConfig?.corner_radius ?? clientStyleProfile?.card_corner_radius\n\n const components = {\n ...baseComponents,\n ...(buttonRadius !== undefined && {\n MuiButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n borderRadius: `${buttonRadius}px`,\n minWidth: buttonRadius,\n minHeight: buttonRadius,\n },\n },\n },\n MuiToggleButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n }),\n ...(cardRadius !== undefined && {\n MuiCard: {\n styleOverrides: { root: { borderRadius: `${cardRadius}px` } },\n },\n MuiPaper: {\n styleOverrides: {\n rounded: { borderRadius: `${cardRadius}px` },\n },\n },\n }),\n }\n\n return { components }\n}\n\n/** @deprecated Use `getClientCustomizations` and pass the result to `createMXTheme` */\nexport const getClientPaletteOptions = (\n clientStyleProfile: ClientStyleProfile,\n mode: PaletteMode,\n): Record<string, string> => {\n const isDark = mode === 'dark'\n const options: Record<string, string> = {}\n\n for (const { key, light, dark } of SEED_CONFIG) {\n const color = clientStyleProfile?.[isDark ? dark : light] as string | undefined\n if (color) options[key] = color\n }\n\n return options\n}\n\n/** @deprecated Build the theme with `getClientCustomizations` + `createMXTheme` and merge `getClientComponentOverrides` on top */\nexport const getClientTheme = (\n theme: Theme,\n clientStyleProfile: ClientStyleProfile,\n clientConfig?: ClientConfig,\n) => {\n const isDark = theme.palette.mode === 'dark'\n const font =\n (clientConfig?.master?.style?.font_name ||\n clientStyleProfile?.body_font_name ||\n clientStyleProfile?.system_font) ??\n theme.typography.fontFamily\n\n const generatePalette = (color: string | undefined, defaultColor: PaletteColor) =>\n color\n ? {\n lighter: lighten(color, 0.5),\n light: lighten(color, 0.25),\n main: color,\n dark: darken(color, 0.25),\n darker: darken(color, 0.5),\n }\n : defaultColor\n\n const palette = Object.fromEntries(\n PALETTE_CONFIG.map(({ key, light, dark }) => [\n key,\n generatePalette(\n clientStyleProfile?.[isDark ? dark : light] as string | undefined,\n theme.palette[key],\n ),\n ]),\n )\n\n const typography = Object.fromEntries(\n TYPOGRAPHY_VARIANTS.map((variant) => [\n variant,\n variant === 'fontFamily' ? font : { fontFamily: font },\n ]),\n )\n\n const baseComponents = {\n MuiTabs: {\n styleOverrides: {\n indicator: { backgroundColor: palette.primary.light },\n },\n },\n MuiPickersCalendarHeader: {\n styleOverrides: {\n switchViewButton: {\n color: palette.primary.lighter,\n '&:hover': { backgroundColor: alpha(palette.primary.light, 0.1) },\n },\n },\n },\n }\n\n const buttonRadius = clientStyleProfile?.button_corner_radius\n const cardRadius = clientStyleProfile?.card_corner_radius\n\n const components = {\n ...baseComponents,\n ...(buttonRadius && {\n MuiButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n borderRadius: `${buttonRadius}px`,\n minWidth: buttonRadius,\n minHeight: buttonRadius,\n },\n },\n },\n MuiToggleButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n }),\n ...(cardRadius && {\n MuiCard: {\n styleOverrides: { root: { borderRadius: `${cardRadius}px` } },\n },\n }),\n ...(cardRadius && {\n MuiPaper: {\n styleOverrides: {\n rounded: { borderRadius: `${cardRadius}px` },\n },\n },\n }),\n }\n\n return { typography, palette, components }\n}\n"],"mappings":";AASA,IAAM,IAAsB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AA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CAAA,KAAe,EAC7C,EACF,EACF;AAAA,IAG4B;AAAA,EAAW;AAC3C"}
@@ -1,2 +1,2 @@
1
1
  export { analyticsSession } from './Analytics';
2
- export { getClientPaletteOptions, getClientTheme } from './Theme';
2
+ export { getClientComponentOverrides, getClientCustomizations, getClientPaletteOptions, getClientTheme, } from './Theme';
@@ -48,7 +48,21 @@ export interface MasterConfig {
48
48
  ui_message_webview_url_scheme?: string;
49
49
  }
50
50
  export interface StyleConfig {
51
+ background_color?: string;
52
+ paper_color?: string;
53
+ primary_color?: string;
54
+ secondary_color?: string;
55
+ success_color?: string;
56
+ error_color?: string;
57
+ warning_color?: string;
58
+ info_color?: string;
59
+ neutral_color?: string;
60
+ corner_radius?: number;
51
61
  font_name?: string;
62
+ header_font_name?: string;
63
+ use_body_font_url?: boolean;
64
+ use_header_font_url?: boolean;
65
+ use_glass?: boolean;
52
66
  }
53
67
  export interface DeepLinkParams {
54
68
  account_guids?: string[];
@@ -115,4 +115,11 @@ export interface ClientStyleProfile {
115
115
  system_font?: string;
116
116
  card_corner_radius?: number;
117
117
  button_corner_radius?: number;
118
+ background_color?: string;
119
+ paper_color?: string;
120
+ body_font_name?: string;
121
+ body_font_url?: string;
122
+ header_font_name?: string;
123
+ header_font_url?: string;
124
+ use_glass?: boolean;
118
125
  }
@@ -1,7 +1,7 @@
1
1
  export type { Account, DetailedAccount, Member, MonthlyAccountBalance } from './Account';
2
2
  export { AccountIcon, AccountIconVariants, AccountSubType, AccountType, AccountTypeName, ConnectionStatus, ConnectionStatusEnums, ErrorStatuses, MfaStatuses, NonConnectedStatuses, ProcessingStatuses, PropertyType, PropertyTypeName, StatusName, } from './Account';
3
3
  export type { AnalyticsEvent, AnalyticsPageview, BasicAnalyticsEvent, BasicAnalyticsPageview, AnalyticsSession, AnalyticEventFunction, AnalyticPageviewFunction, AnalyticsSessionInstance, } from './Analytics';
4
- export type { AppConfig, AppData, Banner, ClientConfig, Config, Options } from './AppData';
4
+ export type { AppConfig, AppData, Banner, ClientConfig, Config, Options, StyleConfig, } from './AppData';
5
5
  export type { Beat, DataSeries } from './Beat';
6
6
  export { UserVerification } from './Beat';
7
7
  export type { Budget, BudgetColors, DetailedBudget, MerchantBudget } from './Budget';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.4.8",
3
+ "version": "9.4.9",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",